When you first create an Azure Kubernetes Service resource it seems to always be created with an older version. I am not sure why Microsoft chose this way, but they did. So in this quick guide i am going to show you how to update your AKS resource using the Azure Cloud Shell.
Check what updates are available
First, we need to check what versions we are able to update to. To do this we can use the following command in the Cloud Shell. You can access the cloud Shell from the Azure Portal or from https://shell.azure.com.
As you can see under the Upgrades heading we have a few versions we can upgrade to.
Upgrade the cluster
We can use the following command to upgrade to the latest available version. This command will add a new node to the AKS cluster, then it will carefully cordon and drain one node at a time to minimise disruption to your applications.
Kubernetes minor versions can not be skipped. This means you will have to upgrade from 1.9 to 1.10 and then 1.11. you are not able to go from 1.9 to 1.11.
You will be prompted if you want to perform this action, you press y.
This will take some time to complete all depending on how many nodes are in your cluster. Once it has finished you will see some JSON on the screen.
I would then use the first command again to see if there is any more updates. If there are some I would also apply them. Just keep doing this till you have no more upgrades to perform.
And that’s it you now have an upgraded AKS cluster. I hope you found this quick guide helpful. If you have any questions please reach out.