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.16.1 or earlier, resize only TKGI clusters that have been upgraded to the current TKGI 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.

Scale Horizontally by Changing the Number of Worker Nodes Using the TKGI CLI

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:

  1. On the command line, run the following command to log in:

    tkgi login -a TKGI-API -u USERNAME -k
    

    Where:

    • TKGI-API is 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, api.tkgi.example.com.
    • USERNAME is your user name.

      See Logging in to Tanzu Kubernetes Grid Integrated Edition for more information about the tkgi login command.

      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

  2. To view the current number of worker nodes in your cluster, run the following command:

    tkgi cluster CLUSTER-NAME
    

    Where CLUSTER-NAME is the name of your cluster.

  3. Run the following command:

    tkgi update-cluster CLUSTER-NAME --num-nodes NUMBER-OF-WORKER-NODES
    

    Where:

    • CLUSTER-NAME is the name of your cluster.
    • NUMBER-OF-WORKER-NODES is 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.

        Note: VMware recommends that you avoid using the tkgi resize command to perform resizing operations.

    For example:

    $ 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.

Scale Vertically by Changing Cluster Node VM Sizes in the TKGI Tile

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:

  1. Log in to Ops Manager.
  2. Select the TKGI tile.
  3. Select the plan that is in use by the cluster(s) you want to resize.
  4. To change the VM size:
    • For Control Plane 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 Control Plane and Worker Node VM Size and Type for information on creating a custom VM size for use with a TKGI cluster.

  5. Click Save to preserve tile changes.
  6. At the Installation Dashboard, click Review Pending Changes.
    The Ops Manager Review Pending Changes page, showing only the TKGI product with an Errands button.
  7. For the TKGI tile, expand the ERRANDS list.
  8. 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.
  9. Click Apply Changes.
check-circle-line exclamation-circle-line close-line
Scroll to top icon