This topic explains how to list available Kubernetes versions and deploy a workload cluster with a non-default Kubernetes version.
To list all available Kubernetes releases with their current compatibility and upgrade status, run tanzu kubernetes-release get
with an optional version match argument, for example:
tanzu kubernetes-release get
.v1.23.16
, run tanzu kubernetes-release get v1.23.10
.tanzu kubernetes-release get
NAME VERSION COMPATIBLE ACTIVE UPDATES AVAILABLE
v1.22.17---vmware.1-tkg.1 v1.22.17+vmware.1-tkg.1 True True
v1.23.16---vmware.1-tkg.1 v1.23.16+vmware.1-tkg.1 True True
v1.24.10---vmware.1-tkg.1 v1.24.10+vmware.1-tkg.1 True True
Tanzu Kubernetes Grid manages Kubernetes versions with Tanzu Kubernetes release (TKr) objects. To discover the TKr versions that are available for a specific workload cluster, run tanzu cluster available-upgrades get
with the full name of the cluster, for example:
tanzu cluster available-upgrades get my-cluster
A TKr can be activated or deactivated. To activate a TKr:
tanzu kubernetes-release activate TKR-NAME
For example:
tanzu kubernetes-release activate v1.22.11---vmware.1-tkg.1
To deactivate a TKr:
tanzu kubernetes-release deactivate TKR-NAME
For example:
tanzu kubernetes-release deactivate v1.22.11---vmware.1-tkg.1
Each release of Tanzu Kubernetes Grid provides a default version of Kubernetes. The default version for Tanzu Kubernetes Grid v2.1.1 is Kubernetes v1.24.10.
As upstream Kubernetes releases patches or new versions, VMware publishes them in a public registry and the Tanzu Kubernetes release controller imports them into the management cluster. This lets the tanzu
CLI create clusters based on the new versions.
On vSphere and Azure, you need to take an additional step before you can deploy clusters that run non-default versions of Kubernetes:
vSphere: Import the appropriate base image template OVA file into vSphere and convert it to a VM template. For information about importing base OVA files into vSphere, see Import the Base Image Template into vSphere.
Azure: Run the Azure CLI command to accept the license for the base OS version. Once you have accepted a license, you can skip this step in the future:
tanzu kubernetes-release get
command into its Azure image SKU as follows:
v
to k8s-
..
to dot
in the version number.+vmware.*
to -ubuntu-2004
, to designate Ubuntu v20.04, the default OS version for all Tanzu Kubernetes Grid VMs on Azure.k8s-1dot24dot10-ubuntu-2004
, k8s-1dot23dot16-ubuntu-2004
.Run az vm image terms accept
. For example:
az vm image terms accept --publisher vmware-inc --offer tkg-capi-2022-06-24 --plan k8s-1dot24dot10-ubuntu-2004
Amazon Web Services (AWS): No action required. The Amazon Linux 2 Amazon Machine Images (AMI) that include the supported Kubernetes versions are publicly available to all AWS users, in all supported AWS regions. Tanzu Kubernetes Grid automatically uses the appropriate AMI for the Kubernetes version that you specify.
To deploy a workload cluster with a version of Kubernetes that is not the default for your version of Tanzu Kubernetes Grid, specify the Tanzu Kubernetes release in the --tkr
option. For example, to deploy a Kubernetes v1.22.17 cluster, run:
tanzu cluster create my-1-22-17-cluster --tkr v1.22.17---vmware.1-tkg
For more details on how to create a workload cluster, see Create Workload Clusters.
For common combinations of OS version, Kubernetes version, and target infrastructure, Tanzu Kubernetes Grid with a standalone management cluster provides default machine images. You can optionally build custom machine images and TKrs.
Reasons to do this include:
For instructions, see Build Machine Images.