Is there a reason to auto-scale kubernetes master?

12/27/2018

I am running a Kubernetes cluster with 3 master and 3 nodes.

I have found this to auto-scale worker nodes based on the pod's status. https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/cloudprovider/aws

But, I couldn't find any blog or add-on to auto-scale master nodes.

Is there any reason to auto-scale master nodes, if yes how can we do that?

-- karthikeayan
autoscaling
kubernetes

1 Answer

12/27/2018

There is no need to autoscale the master nodes. In a practical world, your worker nodes responsibility is to run your work load and your master nodes responsibility is to make sure that your worker nodes are having desired state in the cluster.

Now all the end users will request your application (pods) and as the load increased they need to scale horizontally and more pods should be spawned. If the resources on worker nodes are insufficient to run those nodes, more worker nodes should be spawned.

In large cluster we do not run load on master node, but we need to make sure it is highly available so that there is no single point of failure to orchestrate the worker nodes. For that we can have 3 master multi-master cluster in place.

Worker nodes we worry about the horizontal scalability and In master node we worry about high availability.

But for building large cluster, you need to provide adequate resources to master nodes for handling the orchestration of load on worker nodes.

For more information on building large cluster, please refer official document:

https://kubernetes.io/docs/setup/cluster-large/

In a nutshell, You can even have one master for 1000 worker nodes if you provide enough resources to that node. So, there is no reason to autoscale master comparing to the challenges we face in doing so.

-- Prafull Ladha
Source: StackOverflow