Docker Swarm and Kubernetes Manager hardware requirements

aligin picture aligin · Apr 12, 2016 · Viewed 19.5k times · Source

We are planning to build a small docker cluster for our application services. We considered to use 2 master vms for ha, 1 consul(if we choose Swarm) and 5-10 hosts for containers. We have not yet decided what to use - Docker Swarm or Kubernetes.

So the question is what "hardware" requirements (CPU cores, RAM) managers, both Swarm and Kubernetes, can meet to orchestrate this small cluster.

Answer

Wojciech Tyczynski picture Wojciech Tyczynski · Apr 12, 2016

Just to clarify a bit on what Robert wrote about Kubernetes. If you want to have up to 5 machines for running your applications even 1-core virtual machine (n1-standard-1 on GCE) should be enough. You can handle 10-node cluster with 2-core virtual machine as Robert said. For official recommendations please take a look at: https://kubernetes.io/docs/setup/best-practices/cluster-large/

However, note that resource usage of our master components is more related to number of pods (containers) you want to run on your cluster. If you want to have say single-digit-number of them, even n1-standard-1 GCE should be enough for 10-node cluster. But it's definitely safer to use n1-standard-2 in case of <=10 node clusters.

As for HA, I agree with Robert that having 3 master VMs is better than 2. Etcd (which is our backing storage) requires more than a half of all registered replicas to be up to work correctly, so in case of 2 instances, all of them needs to be up (which is generally not your goal). If you have 3 instances, one of them can be down.

Let me know if you have more questions about Kubernetes.