Scaling a cluster
All these techniques are great for scaling the application, but what about the cluster itself? At some point, you will pack the nodes full and need more resources to schedule new pods for your workloads.
Autoscaling
When you create your cluster, you can customize the starting number of nodes (minions) with the NUM_MINIONS
environment variable. By default, it is set to 4.
Additionally, the Kubernetes team has started to build autoscaling capability into the cluster itself. Currently, this is only supported on GCE and GKE, but work is being done on other providers. This capability utilizes the KUBE_AUTOSCALER_MIN_NODES
, KUBE_AUTOSCALER_MAX_NODES
, and KUBE_ENABLE_CLUSTER_AUTOSCALER
environment variables.
Â
Â
The following example shows how to set the environment variables for autoscaling before running kube-up.sh
:
$ export NUM_MINIONS=5
$ export KUBE_AUTOSCALER_MIN_NODES=2
$ export KUBE_AUTOSCALER_MAX_NODES=5
$ export KUBE_ENABLE_CLUSTER_AUTOSCALER=true
Also, bear in mind that changing...