How To Upgrade an AKS Cluster Kubernetes Version

In this blog post, I will show you how to upgrade an Azure Kubernetes Service (AKS) cluster using three simple Azure CLI commands.

In the last few weeks, we learned how to deploy an AKS cluster using ARM and Terraform and also how to connect to it using Azure CLI and Kubectl.

Upgrade Process

When it comes to updates and upgrades of AKS, Microsoft makes a new version available to your cluster based on the region and a schedule, It practice it means that the latest Kubernetes version will not be available to your cluster immediately and sometimes it can take a few weeks for you to get.

Check Current Version

The first step in the upgrade is to check which version is installed on your cluster by using the following command.

az aks show --resource-group RGNAME --name CLUSTENAME --output table

Next, we need to check which version of Kubernetes is available for us to upgrade in our region. Please note that versions are different depending on your region.

az aks get-upgrades --resource-group RGNAME --name CLUSTERNAME  --output table

After reviewing and taking note of the version available in your region run the command below with the version number, note that you can also install a preview version but try to avoid using it in production. Below I’m installing version 1.18.10,

az aks upgrade  --resource-group RGNAME --name CLUSTERNAME --kubernetes-version 1.18.10

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.