Table of Contents
Overview
With a little preparation, upgrading TKGs is a straightforward process that incurs no downtime.
Preparation
There are a few preparation steps that should be completed before upgrading a TKGs cluster.
Spend time on the VMware interoperability website to ensure that the version of vSphere you are upgrading to is compatible with the version of TKGs you are upgrading to. This is especially important in a VMware SDDC environment where the vSphere version is dependent on the version of SDDC.
Spend time on the VMware upgrade path website to ensure that the you are moving through a supported path.
Gather your upgrade information. You will need the following bits of info to upgrade a TKGs cluster:
- The version of vSphere you are on
- The version of TKGs you are on
- The version of TKGs you are upgrading to
For example;
Component Current Version New Version vSphere 7.1U2 TKGs 1.4.0 1.4.2 Gather the versions of ALL workload clusters running on the TKGs cluster. You will need this information to verify compatibility before the update.
For example;
Workload Cluster Kubernetes Version cluster-1 1.21.8 cluster-2 1.21.8 cluster-3 1.21.8 You can check the currently available releases that can be used with the following command:
kubectl get tanzukubernetesreleasesLook for the
COMPATIBLEcolumn in the results.NAME VERSION READY COMPATIBLE CREATED UPDATES AVAILABLE v1.18.15---vmware.1-tkg.1.600e412 1.18.15+vmware.1-tkg.1.600e412 True True 21h [1.19.7+vmware.1-tkg.1.fc82c41] v1.19.7---vmware.1-tkg.1.fc82c41 1.19.7+vmware.1-tkg.1.fc82c41 True True 21h [1.20.2+vmware.1-tkg.1.1d4f79a] v1.20.2---vmware.1-tkg.1.1d4f79a 1.20.2+vmware.1-tkg.1.1d4f79a True True 21hVMware also provides a handy
find-incompatible-tkcsscript to help, available HEREThe version of TKG that you are installing directly relates the the version of Kubernetes that will be deployed. For the latest table of Kubernetes versions and TKG versions, see the release notes. For example it might look like this:
Tanzu Kubernetes Grid Version Kubernetes Version of Management Cluster Provided Kubernetes (TKr) Versions 1.6.1 1.23.10 1.23.10, 1.22.13, 1.21.14 1.6.0 1.23.8 1.23.8, 1.22.11, 1.21.14 1.5.4 1.22.9 1.22.9, 1.21.11, 1.20.15 1.5.3 1.22.8 1.22.8, 1.21.11, 1.20.15 1.5.2, 1.5.1, 1.5.0 1.22.5 1.22.5, 1.21.8, 1.20.14 1.4.2 1.21.8 1.21.8, 1.20.14, 1.19.16 1.4.0, 1.4.1 1.21.2 1.21.2, 1.20.8, 1.19.12 Review the TKGs release notes to ensure that you are familiar with any known issues or changes in the release you are moving to. You can find the right TKG docs for your deployment on the VMware Tanzu Kubernetes Grid website.
As with all upgrades, ensure that the cluster is in a healthy state. If the cluster is not healthy, you are setting yourself for failure.
If you are using the vSphere Content Library to house your images, ensure that the library is healthy and the content is pre-downloaded ready for use.
Upgrade
There are multiple options for upgrading a TKGs cluster and not all are covered here in depth. It’s always a good idea to check the latest official documentation is available over on the VMware Docs website.
Upgrade using vSphere Lifecycle Manager
If you are using vSphere Lifecycle Manager, it can’t get any easier.
Upgrading using vCenter Server Appliance
If you are running the vCenter Server Appliance, each time you perform an upgrade each Supervisor Cluster that is running an N-3 version of Kubernetes will automatically be upgraded to N-1 version in-line with what the vCenter Server Appliance supports.
Just be sure to check for compatibility of the workload clusters before upgrading.
Upgrading via a Namespaces Update
Another option is to update via a Namespace update, instructions for which can found here .
The main points to be aware of are:
- Ensure all workloads are in a
Runningstate before upgrading. - Upgrading the Supervisor Cluster in this way will trigger a rolling upgrade of all workload clusters.
- You MUST update incrementally when using this method, do not skip updates.
Be sure to check your applications are compatible with the new Kubernetes version before upgrading. There are 3rd party solutions to assist in this area such as kube-no-trouble or pluto .
