Scale In Kubernetes Cluster

EKF already seamlessly supports scaling a Kubernetes cluster in and out automatically, according to demand. It uses a modified version of the Cluster Autoscaler, which works with local volumes, including Rok volumes. You no longer need to run rok-k8s-drain manually to scale in a cluster, since the Cluster Autoscaler will scale in the cluster seamlessly, according to its configuration.

However, if you need to force the cluster to scale in a cluster to a desired size immediately, you can still use the rok-k8s-drain tool directly.

Note

Like Cluster Autoscaler, the rok-k8s-drain tool is cloud aware, i.e., it needs to be aware of the properties of the cloud it operates on and the underlying structures that comprise a node group.

rok-k8s-drain currently supports scaling-in only EKS clusters.

Note

See the Deploy Cluster Autoscaler guide for instructions on how to deploy the Cluster Autoscaler. See the official Cluster Autoscaler instructions on how to configure the Cluster Autoscaler.

Procedure

  1. Run rok-k8s-drain and follow the on-screen instructions:

    root@rok-tools:~# rok-k8s-drain

Verify

  1. Verify that the cluster has been scaled-down, by listing the nodes:

    root@rok-tools:~# kubectl get nodes

Summary

You have successfully scaled-in your cluster.

What’s Next

Check out the rest of the maintenance operations that you can perform on your cluster.