Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker Swarm and Kubernetes Manager hardware requirements

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.

like image 285
aligin Avatar asked Apr 12 '16 07:04

aligin


Video Answer


2 Answers

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.

like image 160
Wojciech Tyczynski Avatar answered Sep 16 '22 23:09

Wojciech Tyczynski


For Kubernetes, a single 2-core virtual machine (e.g. n1-standard-2 on GCE) can handle 5 nodes and probably 10. If you want to run an HA master configuration, you are likely to want 3 nodes to create a quorum for the etcd instances and you may want to provision slightly larger instances (like an n1-standard-4) to account for the overhead of clustering etcd.

like image 22
Robert Bailey Avatar answered Sep 16 '22 23:09

Robert Bailey