Scale Kubernetes Cluster Vertically
Procedures to scale Kubernetes cluster vertically by modifying EC2 instance types
This assumes you’ve followed the Geodesic Module Usage guide which covers all the scaffolding necessary to get started.
Kops cluster can be scaled vertically by modifying EC2 instance types.
Kops supports rolling cluster upgrades where the master and worker nodes are upgraded one by one.
First, in the module’s
NODE_MACHINE_TYPE to reflect the desired EC2 instance type of the worker nodes:
Dockerfile Kops config
geodesic shell by running:
Then, ensure that the
kubectl context has been set.
geodesic shell run:
kops export kubecfg $KOPS_CLUSTER_NAME
Check and apply the latest Kubernetes update:
kops upgrade cluster --yes
--yes option immediately applies the changes. Not specifying the
--yes option shows only the changes that are applied.
Update the Kubernetes state store to match the cluster state. This can be done using the following command:
kops update cluster --yes
Lastly, perform a rolling update for all cluster nodes using the kops
kops rolling-update cluster --yes
--yes updates all nodes in the cluster, first master nodes and then worker nodes.
There is a configurable 5-minute delay between restarting master nodes, and a 2-minute delay between restarting nodes.
These values can be altered using
--node-interval options, respectively.
Only the worker nodes may be updated by using the
--instance-group node option.