2
votes

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?

1
In Kubernetes, masters do not scale. In a multinode master, adding more masters helps with high availability (HA) and not managing workload. To scale a master you must manually scale up (bigger instances size). Scaling out (more instances) does not help with master performance (just HA).John Hanley
@JohnHanley Kubernetes newbie here. Do I manually need to scale up master, when one of the master nodes crash? Or can I set something like min-idle-instances (to say 3) and cluster will maintain that configuration of master nodes for me?narendra-choudhary
When the Kubernetes master node crashes in a single master cluster, your cluster is gone. This means that you start over and build a new cluster. For most of the cloud vendors you must select the correct instance size before creating the cluster. If you are concerned about HA, select a three node master. Of course this raises the cost a bit.John Hanley
@karthikeayan aws tag can be removed as nothing about this question is specific to aws.narendra-choudhary
@narendra-choudhary yup.. removed itkarthikeayan

1 Answers

3
votes

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.