check-circle-line exclamation-circle-line close-line

<

To upgrade your Tanzu Kubernetes Grid instance, you must first upgrade the management cluster. You cannot upgrade Tanzu Kubernetes clusters until you have upgraded the management cluster that manages them.

Prerequisites

Procedure

In Tanzu Kubernetes Grid 1.1.3, the default version of Kubernetes is 1.18.6. This procedure assumes that you are upgrading the management cluster to Tanzu Kubernetes Grid 1.1.3.

  1. Run the tkg get management-cluster command to see the list of management clusters that you have deployed from your bootstrap environment machine.

    tkg get management-cluster
    
  2. Run the tkg set management-cluster command to to set the context of the Tanzu Kubernetes Grid CLI to the management cluster that you want to upgrade.

     tkg set management-cluster management_cluster_name 

  3. Run the tkg get cluster command with the --include-management-cluster option.

    tkg get cluster --include-management-cluster
    

    The tkg get cluster command shows the version of Kubernetes that is running in the management cluster and all of the clusters that it manages.

    NAME                NAMESPACE   STATUS    CONTROLPLANE  WORKERS  KUBERNETES
    k8s-1-17-3-cluster  default     running  1/1           1/1      v1.17.3+vmware.1 
    k8s-1-17-6-cluster  default     running  1/1           1/1      v1.17.6+vmware.1 
    k8s-1-18-2-cluster  default     running  1/1           1/1      v1.18.2+vmware.1 
    mgmt-cluster        tkg-system  running  1/1           1/1      v1.18.3+vmware.1 
    
  4. Run the tkg upgrade management-cluster command and enter y to confirm.

    The following command upgrades the management cluster named mgmt-cluster.

     tkg upgrade management-cluster mgmt-cluster 

    If you are upgrading a management cluster that is running on vSphere, and if your vSphere inventory includes more than one base OS template that is running the same version of Kubernetes, specify the --vpshere-vm-template-name option with the name of the template to use to create the cluster.

    NOTE: This is an advanced option that you should not normally need to use. Use this option only when instructed to do so by VMware Tanzu Support.

     tkg upgrade management-cluster mgmt-cluster --vpshere-vm-template-name baseos_template_name 

    To skip the confirmation step when you upgrade a cluster, specify the --yes option.

     tkg upgrade management-cluster mgmt-cluster --yes 

    The upgrade process first upgrades the Cluster API providers for vSphere or Amazon EC2 that are running in the management cluster. Then, it upgrades the version of Kubernetes in all of the control plane and worker nodes of the management cluster.

    If the upgrade times out before it completes, run tkg upgrade management-cluster again and specify the --timeout option with a value greater than the default of 30 minutes.

     tkg upgrade management-cluster mgmt-cluster --timeout 45m0s 

  5. When the upgrade finishes, run the tkg get cluster command with the --include-management-cluster option again, to check that the management cluster has been upgraded.

    tkg get cluster --include-management-cluster
    

    You see that the management cluster is now running the new version of Kubernetes, but that the Tanzu Kubernetes clusters are still running previous versions of Kubernetes.

    NAME                NAMESPACE   STATUS    CONTROLPLANE  WORKERS  KUBERNETES
    k8s-1-17-3-cluster  default     running  1/1           1/1      v1.17.3+vmware.1 
    k8s-1-17-6-cluster  default     running  1/1           1/1      v1.17.6+vmware.1 
    k8s-1-18-2-cluster  default     running  1/1           1/1      v1.18.2+vmware.1 
    mgmt-cluster        tkg-system  running  1/1           1/1      v1.18.6+vmware.1 
    

What to Do Next

You can now upgrade the Tanzu Kubernetes clusters that this management cluster manages. By default, any new clusters that you deploy with this management cluster will run the new default version of Kubernetes. In Tanzu Kubernetes Grid 1.1.3, the default version of Kubernetes is 1.18.6. However, if required, you can use the tkg create cluster command with the --kubernetes-version option to deploy new clusters that run different versions of Kubernetes. For more information, see Deploy a Cluster that Runs a Different Version of Kubernetes.