Search code examples
dockercontainersmesoskubernetes

Kubernetes on Mesos


I Have the following setup in mind: Kubernetes on Mesos (based on the kubernetes-mesos project) within a /16 network. Each pod will have its own IP and I believe this will avail 64 000 pods. The idea is to provide isolation for each app i.e. Each app gets its own mysql within the same pod - the app accesses mysql on localhost(within the pod). If an additional service were needed, I'd use kubernetes rolling updates to add the service's container to the pod, the app will be able to access this new service on localhost as well. Each application needs as much isolation as possible.

  1. Are there any defects to such an implementation?
  2. Do I have to use weave?
    • There's an option to specify the service-ip-range while running the kubernetes-mesos install.
  3. One hole is how do I scale a service, is this really viable?
  4. Is there a better way to do this? i.e. Offering isolated services

Thanks. PS//I'm obviously a noobie at this and I'm trying to get the best possible setup running.


Solution

  • This sort of design will work for small applications, but you're right that it'll be tough to scale up if you suddenly want two have a couple instances of a service hit the same mysql backend.

    You may want to look into putting each service into a separate namespace. Then a service's DNS lookups will be scoped to its own namespace by default so that it won't find other services' resources unless it's explicitly looking for them. This would let you put mysql (and any other dependencies) in a separate pod so that the frontend could be scaled independently.