Resizing TKGm Cluster in VCD

This blog post explains how to resize (horizontal scale) a CSE provisioned TKGm cluster in VCD. 

In my lab, I deployed a TKGm cluster with one control plane and one worker node. 

To resize the cluster through the VCD UI, go to the Kubernetes Container Clusters page and select the TKGm cluster to resize. Click on the Resize option.

Select the number of worker nodes you want in your TKGm cluster and click the Resize button.

And boom…..the operation failed immediately with an error as shown in the below screenshot. 

I began my investigation by inspecting the cse-server-debug.log file, and to my astonishment, there were no log entries in the file. That’s strange.

On further investigation, I came across this blog post by Hugo Phan who is working as Staff Solutions Architect in our team. Hugo had the same issue as mine. 

The reason for this failure is “vcd cse cluster resize” command is not enabled if your CSE server is using “legacy_mode: false”

How do I fix this issue?

The below steps shows the procedure for fixing the cluster resize issue.

Step 1: Login to VCD as tenant org-admin using vcd-cli.

Step 2: List provisioned TKGm clusters.

Step 3: Obtain the information about the cluster that you want to resize.

# vcd cse cluster info <cluster-name>

The output of the command returns a yaml code containing the cluster info.

Step 4: Prepare an updated cluster config file.

Copy the output of the vcd cse cluster info command and paste it into your preferred editor. Remove the entire section beginning with the word “status.”

Change the value of workers: count the number of workers nodes you want to have and save the yaml file. A sample yaml is shown below for reference.

Step 5: Resize TKGm Cluster

Apply the updated cluster config file to initiate cluster resize.

CSE initiates the deployment of additional worker nodes. You can track the status under the Monitor > Tasks page. 

Step 6: Validate Cluster Resize

Run the kubectl get nodes command to validate that the additional worker nodes are deployed and configured and joined the k8 cluster. 

Important Note: CSE 3.1.1 only supports scaling up a TKGm cluster, scale-down is not yet supported.

I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing.

Leave a ReplyCancel reply