Kubernetes on Mesos Kubernetes on Mesos kubernetes kubernetes

Kubernetes on Mesos


A common misconception is that a Pod should manage a vertical, multi-tier stack: for example a web tier + DB tier together.

It's interesting to read the Kubernetes design intent of Pods: they're for collecting 'helper' processes rather than composing a vertical stack.

To answer your questions, I'd recommend:

  • Define a Pod template for the web tier only. This can be scaled to any size required, using a replication controller (questions #1 and #3).
  • Define another Pod for MySQL.
  • Use the Service abstraction to locate these components.


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.