Scaling Existing Clusters
Page last updated:
This topic explains how to scale an existing cluster horizontally by adding worker nodes and vertically by changing the size of the node VMs.
WARNING: Do not change the number of master/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 master/etcd nodes for plans with existing clusters.
Note: 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.
You can use the TKGI CLI to scale an existing cluster by increasing or decreasing the number of worker nodes in the cluster.
Warning: Do not use
on clusters configured with a network profile CNI configuration.
For more information, see TKGI CLI Resize and Update Cluster Commands Remove Network Profile CNI Configuration from a Cluster
in the Release Notes.
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 -kWhere:
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.
See Logging in to Tanzu Kubernetes Grid Integrated Edition for more information about the
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-NAMEis 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.
- To scale down your existing cluster, enter a number lower than the current number of worker nodes.
- To scale up your existing cluster, enter a number higher than the current number of worker
nodes. The maximum number of worker nodes you can set is configured in the Plan pane of
the Tanzu Kubernetes Grid Integrated Edition tile in Ops Manager.
VMware recommends that you avoid using the
tkgi resizecommand to perform resizing operations.
$ tkgi update-cluster my-cluster --num-nodes 5
Note: This command may 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 master 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:
- Log in to Ops Manager.
- Select the TKGI tile.
- Select the plan that is in use by the cluster(s) you want to resize.
- To change the VM size:
- For Master nodes, select the desired VM size from the Master/ETCD VM Type menu.
- For Worker nodes, select the desired VM size from the Worker VM Type menu.
Note: See Customize Master and Worker Node VM Size and Type for information on creating a custom VM size for use with a TKGI cluster.
- Click Save to preserve tile changes.
- At the Installation Dashboard, click Review Pending Changes.
- For the TKGI tile, expand the ERRANDS list.
- Select the Update all clusters errand if it is not already selected. You must ensure that Update all clusters errand is selected so that the cluster deployment manifest is regenerated after the plan is updated.
- Click Apply Changes.
Please send any feedback you have to email@example.com.