You can update a Tanzu Kubernetes cluster, including the Kubernetes version, by updating the distribution version, the virtual machine class, or the storage class.
Tanzu Kubernetes Cluster Update Requirements
Read the release notes before you perform a Tanzu Kubernetes cluster update.
To update Tanzu Kubernetes clusters, first perform a vSphere Namespaces update. When you perform a vSphere Namespace update, all Tanzu Kubernetes clusters must be in a running state. See Update the Supervisor Cluster by Performing a vSphere Namespaces Update.
The Kubernetes software version is a string in the cluster manifest that is semantic version notation. For example, if the version is
1.18.5, "1" is the major version, "18" is the minor version, and "5" is the patch version.
- You cannot decrease the version. For example, you cannot downgrade from Kubernetes v1.18 to v1.17.
- You can upgrade the minor version, but only incrementally. Skipping minor versions is not supported. For example, you can upgrade from Kubernetes v1.17 to v1.18, but you cannot upgrade from Kubernetes v1.16 to v1.18.
- You cannot change the major version, such as upgrading from v1.18 to v2.0.
version: v1.18.5, which is resolved to the most recent image matching that patch version, or
version: v1.18, which is resolved to the most recent matching patch version. The resolved version displays as the
fullVersionin the cluster manifest such as
fullVersionto the manifest. To perform a Tanzu Kubernetes version upgrade using a version shortcut, you must unset (remove) the
fullVersionfrom the manifest.
Performing a Tanzu Kubernetes Cluster Update
VirtualMachineImagethat corresponds to a distribution version initiates a rolling update as the system attempts to get all nodes running on the new image. Also, updating a Supervisor Cluster will likely trigger a rolling update of the Tanzu Kubernetes clusters deployed there. For example, when the
vmware-system-tkg-controller-manageris updated, the system introduces new values into the manifest generator and the controller initiates a rolling update to deploy those values.
Cluster Manifest Update Methods
- By using the
kubectl edit tanzukubernetescluster/CLUSTER-NAMEcommand. This command opens the entire cluster manifest in the text editor defined by your KUBE_EDITOR or EDITOR environment variable. When you save the file, the cluster is updated with the changes. For more information on the
kubectl editcommand, see edit command in the Kubernetes documentation. To use the
kubectl editapproach, refer to the following topics:
- By using the
kubectl patchcommand. This command performs an "in-place" update of a cluster. The purpose of the this command is to provide a method for upgrading Kubernetes versions, and is the approach documented here. For more information on the
kubectl patchcommand, see Update API Objects in Place Using kubectl patch in the Kubernetes documentation. To use the
kubectl patchapproach, refer to the following topic:
- By using the
kubectl applycommand with a local YAML file that you manually update. While this approach has the advantage of being similar to the way you create a cluster, if you do not have access to the current cluster YAML this approach can be destructive and is therefore not recommended.