Tanzu Kubernetes Grid make it very simple to upgrade Kubernetes clusters , without impacting availability of control plane and also ensures rolling update for worker nodes.we just need to run two commands to upgrade Tanzu Kubernetes Grid: “
tkg upgrade management-cluster” and
tkg upgrade cluster CLI commands to upgrade clusters that we deployed with Tanzu Kubernetes Grid 1.0.0. In this blog post we will upgrade Tanzu Kubernetes Grid from version 1.0.0 to 1.1.0
In this post we are going to upgrade TKG from version 1.0.0 to version 1.1.0 and to start upgrading we need to download the new versions of “TKG” client cli , Base OS Image Template and API server load balancer.
- Download and Install new version of “TKG” cli on your client VM
- Download and upload For Linux – VMware Tanzu Kubernetes Grid CLI 1.1.0 Linux.
- Unzip using
- #gunzip tkg-linux-amd64-v1.1.0-vmware.1.gz
- unzip file named will be tkg-linux-amd64-v1.1.0-vmware.1
- move and rename to “tkg” using
- #mv ./tkg-linux-amd64-v1.1.0-vmware.1 /usr/local/bin/tkg
- Make it executable using
- #chmod +x /usr/local/bin/tkg
- Run #tkg version , this should show updated version of “tkg cli” client command line
- Download the new version
- Download OVA for Node VMs: photon-3-kube-v1.18.2-vmware.1.ova
- Download OVA for LB VMs: photon-3-haproxy-v1.2.4-vmware.1.ova
- Once download,Deploy these OVA using “Deploy OVF template” on vSphere
- When OVA deployment completed, right click the VM and select “Template” and click on “Convert to Template”
Upgrade TKG Management Cluster
As you know management cluster is a purpose-built for operating the Tanzu platform and managing the lifecycle of Tanzu Kubernetes clusters. so we need to first upgrade Tanzu Management Cluster before we upgrade our Kubernetes clusters.This is the most seamless upgrade of Kubernetes cluster, i have ever done, so let’s get in to:
- First list TKG management cluster which are running in my environment using, command will display the information of tkg management clusters
- #tkg get management Cluster
- Once got the name of management cluster , run below command to proceed with upgrade
- #tkg upgrade management-cluster <management-cluster-name>
- Upgrade process first upgrades the Cluster API providers for vSphere, then it upgrades the K8s version in control plane and worker node of management cluster.
- if everything goes fine, it should take less than 30 minutes to complete the upgrade process of management plane.
- Now if you run #tkg get cluster –include-management-cluster , it should show upgraded version of management cluster.
Upgrade Tanzu Kubernetes Cluster
Now since our management plane is upgraded. lets go ahead and upgrade Tanzu Kubernetes Clusters.
- Here also process is same as we did for management cluster run below command to proceed with upgrade
- #tkg upgrade cluster <cluster-name>
- if the cluster is not running in”default” namespace, specify “–namespace” option (when TKG is part of vSphere7 with Kubernetes)
- the upgrade process will upgrade Kubernetes version across your control and worker virtual machines.
- Once done , you must see successful upgrade of Kubernetes clusters.
- Now login with your credential and see the Kubernetes version your cluster is running.
This completes the upgrade process, such an easy process of upgrading Kubernetes clusters without impacting availability of cluster.