preloader

Upgrades

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.

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

  2. Spend time on the VMware upgrade path website to ensure that the you are moving through a supported path.

  3. 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;

    ComponentCurrent VersionNew Version
    vSphere7.1U2
    TKGs1.4.01.4.2
  4. 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 ClusterKubernetes Version
    cluster-11.21.8
    cluster-21.21.8
    cluster-31.21.8

    You can check the currently available releases that can be used with the following command:

    kubectl get tanzukubernetesreleases
    

    Look for the COMPATIBLE column 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         21h
    

    VMware also provides a handy find-incompatible-tkcs script to help, available HERE

  5. The 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 VersionKubernetes Version of Management ClusterProvided Kubernetes (TKr) Versions
    1.6.11.23.101.23.10, 1.22.13, 1.21.14
    1.6.01.23.81.23.8, 1.22.11, 1.21.14
    1.5.41.22.91.22.9, 1.21.11, 1.20.15
    1.5.31.22.81.22.8, 1.21.11, 1.20.15
    1.5.2, 1.5.1, 1.5.01.22.51.22.5, 1.21.8, 1.20.14
    1.4.21.21.81.21.8, 1.20.14, 1.19.16
    1.4.0, 1.4.11.21.21.21.2, 1.20.8, 1.19.12
  6. 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.

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

  8. 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 Running state 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 .