This topic describes how to scale an existing VMware Tanzu Kubernetes Grid Integrated Edition (TKGI) provisioned cluster. You can scale TKGI-provisioned clusters horizontally by adding worker nodes or vertically by changing the size of the node VMs.
WARNING: If you are on TKGI v1.15.4 or earlier, resize only the clusters that have been upgraded to the current TKGI control plane version.
To change the default number of worker nodes created in new clusters, change your plan’s Worker Node Instances setting. For more information, see Plans in the Installing TKGI topic for your IaaS.
WARNING: Do not change the number of control plane/etcd nodes for any plan that was used to create currently-running clusters. Tanzu Kubernetes Grid Integrated Edition does not support changing the number of control plane/etcd nodes for plans with existing clusters.
You can use the TKGI CLI to scale an existing cluster by increasing or decreasing the number of worker nodes in the cluster.
To increase or decrease the number of worker nodes on a cluster:
On the command line, run the following command to log in:
tkgi login -a TKGI-API -u USERNAME -k
TKGI-APIis the domain name for the TKGI API that you entered in Ops Manager > Tanzu Kubernetes Grid Integrated Edition > TKGI API > API Hostname (FQDN). For example,
USERNAMEis your user name.
Note: If your operator has configured Tanzu Kubernetes Grid Integrated Edition to use a SAML identity provider, you must include an additional SSO flag to use the above command. For information about the SSO flags, see the section for the above command in TKGI CLI. For information about configuring SAML, see Connecting Tanzu Kubernetes Grid Integrated Edition to a SAML Identity Provider
To view the current number of worker nodes in your cluster, run the following command:
tkgi cluster CLUSTER-NAME
CLUSTER-NAME is the name of your cluster.
Run the following command:
tkgi update-cluster CLUSTER-NAME --num-nodes NUMBER-OF-WORKER-NODES
CLUSTER-NAMEis the name of your cluster.
NUMBER-OF-WORKER-NODESis the number of worker nodes that you want to set for the cluster.
Note: VMware recommends that you avoid using the
tkgi resize command to perform resizing operations.
$ tkgi update-cluster my-cluster --num-nodes 5
Note: This command might roll additional virtual machines in the cluster, which can affect workloads if the worker nodes are at capacity.
You can scale an existing cluster vertically by changing the size of the control plane or worker node VMs. When you do this, BOSH recreates the VMs sequentially, one cluster at a time, and one node after another within the cluster. For more information, see VM Sizing for TKGI Clusters.
To change the size of a Kubernetes cluster node VM, complete the following steps:
Note: See Customize Control Plane and Worker Node VM Size and Type for information on creating a custom VM size for use with a TKGI cluster.