This topic explains how to scale a workload cluster in two ways:
Scale horizontally: Scale the number of control plane and worker nodes. See Scale a Cluster Horizontally.
Scale vertically: Change the size of the control plane and worker nodes. See Scale a Cluster Vertically.
Note: To scale nodes in a node pool, see Update Node Pools in Manage Node Pools of Different VM Types.
You can horizontally scale a workload cluster in two ways:
tanzu cluster scale command.
--worker-machine-countoptions set the new number of control plane and worker nodes, respectively.
To scale a cluster to 5 control plane nodes and 10 worker nodes:
tanzu cluster scale MY-CLUSTER --controlplane-machine-count 5 --worker-machine-count 10
If you deployed a cluster with
--controlplane-machine-count 1 and then you scale it up to 3 control plane nodes, Tanzu Kubernetes Grid automatically enables stacked HA on the control plane.
If the cluster is running in a namespace other than
default, you must include the
tanzu cluster scale MY-CLUSTER --controlplane-machine-count 5 --worker-machine-count 10 --namespace=MY-NAMESPACE
Note: On clusters that run in vSphere with Tanzu, you can only run either 1 control plane node or 3 control plane nodes. You can scale up the number of control plane nodes from 1 to 3, but you cannot scale down the number from 3 to 1.
Important: Do not change context or edit the
.kube-tkg/config file while Tanzu Kubernetes Grid operations are running.
Class-based clusters: Follow the Configuring Cluster Topology procedure to change the
replicas settings under
workers in the cluster definition.
How to vertically scale a workload cluster depends on the cluster type:
Class-based Clusters: Follow the Configuring Cluster Topology procedure to change the
vmClass settings in the cluster definition.
TKC Clusters: Follow the Updating Infrastructure Machine Templates procedure in The Cluster API Book, which changes the cluster’s machine template.
The procedure downloads the cluster’s existing machine template, with a
kubectl get command that you can construct as follows:
kubectl get MACHINE-TEMPLATE-TYPE MACHINE-TEMPLATE-NAME -o yaml
AWSMachineTemplateon Amazon Web Services (AWS)
MACHINE-TEMPLATE-NAMEis the name of the machine template for the cluster nodes that you are scaling, which follows the form:
CLUSTER-NAME-control-planefor control plane nodes
CLUSTER-NAME-workerfor worker nodes
kubectl get VsphereMachineTemplate monitoring-cluster-worker -o yaml