Scaling and upgrading management and/or workload clusters in Tanzu Community Edition are very common Day2 operations and they need to be carefully planned before execution to avoid any unpleasant surprises.
In this blog post I am sharing step by step how Tanzu community edition management and workload clusters can be scaled and upgraded.
In a previous blog post we deployed a TCE management and workload clusters using TCE version 0.10.0, in this blog post I will be upgrading both clusters to version 0.11.0 and verify the upgrade. Once successful I will be expanding workload cluster by one worker node.
The components that we need to upgrade are the Tanzu CLI version and Kubernetes release running in management and workload clusters.
Lab Inventory
For software versions I used the following:
- VMware ESXi 7.0U3d
- vCenter server version 7.0U3
- TrueNAS 12.0-U7 used to provision NFS datastores to ESXi hosts.
- VyOS 1.4 used as lab backbone router and DHCP server.
- Ubuntu 18.04 LTS as bootstrap machine.
- Ubuntu 20.04.2 LTS as DNS and internet gateway.
- Windows Server 2012 R2 Datacenter as management host for UI access.
- Tanzu Community Edition version 0.10.0
For virtual hosts and appliances sizing I used the following specs:
- 3 x virtualised ESXi hosts each with 8 vCPUs, 4 x NICs and 64 GB RAM.
- vCenter server appliance with 2 vCPU and 24 GB RAM.
Inspecting current TCE deployment and versions
Login to your Bootstrap machine (in my environment it is an Ubuntu 18.04 machine) and run the following commands:
tanzu version
tanzu management-cluster get
tanzu cluster get <workload cluster name>

Verify Tanzu CLI version along with the Kubernetes version running in the management and workload clusters. I will be upgrading my Tanzu CLI to 0.11.0 and Kubernetes version to inside both management and workload clusters.
In addition, you can see that both management and workload clusters are having one worker node, I will be scaling the workload cluster by one extra worker node.
Upgrading Tanzu CLI and Kubernetes version
Upgrading Tanzu CLI is pretty simple, you need to pick the version you need from Github Tanzu release page and extract it to your bootstrap machine.
I used wget to download Tanzu 0.11.0
wget https://github.com/vmware-tanzu/community-edition/releases/download/v0.11.0/tce-linux-amd64-v0.11.0.tar.gz
Then you need to extract the tar archive
tar zxvf tce-linux-amd64-v0.11.0.tar.gz

After extracting the tar archive, you just need to run the install.sh script and it will remove the old Tanzu CLI version and upgrade the required packages (quite simple)

Verify that Tanzu CLI is upgraded using the command “tanzu version”

Upgrade Management Cluster
Make sure that you are logged in to your Tanzu management cluster and then run the following commands to switch your Kubernetes config to the management cluster:
tanzu management-cluster kubeconfig get tce-mgmt-cluster01 --admin
kubectl config use-context tce-mgmt-cluster01-admin@tce-mgmt-cluster01
To start the upgrade process, run the command:
tanzu management-cluster upgrade
During the upgrade process various components will be deleted and new patches will be downloaded and installed, see below some screenshots from the the upgrade process. The process will start first patching the control plane node(s) and then the worker nodes(s).


The above screenshot shows that during the upgrade process the control plane and worker nodes running old version will be completely deleted from vSphere and will be redeployed using the image templates with the new versions.
Verify that the management cluster version has been updated

Upgrade Workload cluster
Follow the same procedure to upgrade workload cluster, use the below commands:
tanzu cluster kubeconfig get tce-wld-cluster01 –admin
kubectl config use-context tce-wld-cluster01-admin@tce-wld-cluster01
To start the upgrade:
tanzu cluster upgrade tce-wld-cluster01

Give it about 20 minutes, after that workload cluster should also be reflecting new Kubernetes version

Scaling up workload cluster
Scaling Tanzu Community Edition management or workload clusters can be done with different methods, however the easiest (in my opinion) is using the tanzu command line.
Login to your bootstrap machine and then login to your management cluster:

Simply run the following command to horizontally scale your Tanzu workload cluster:
tanzu cluster scale tce-wld-cluster01 --controlplane-machine-count 1 --worker-machine-count 2

In the above command we specified the exact number of our control plane and worker nodes (initially we had 1 control plane node and 1 worker node).
After scaling the cluster, we will end up with one control node and two worker nodes.
Final words
Tanzu Community Edition is a powerful open source Tanzu platform which offers operations simplicity from deployment till day 2 operations such as upgrading and scaling up (horizontally and vertically). In my coming blog posts I am going to focus on TCE clusters observability using vRealize Operations and Network Insight, stay tuned.