Azure Hands-On Lab - Patch and upgrade an AKS Cluster
Azure Learning Path for Cloud and DevOps Engineers

I have over 20 years of experience in IT Infrastructure and currently work at Microsoft as an Azure Kubernetes Support Engineer, where I support and manage the AKS, ACI, ACR, and ARO tools. Previously, I worked as a Fault Management Cloud Engineer at Nokia for 2.9 years, with expertise in OpenStack, Linux, Zabbix, Commvault, and other tools. In this role, I resolved critical technical incidents, ensured consistent uptime, and safeguarded against revenue loss from customers. Additionally, I briefly served as a Technical Team Lead for 3 months, where I distributed tasks, mentored a new team member, and managed technical requests and activities raised by our customers. Previously, I worked as an IT System Administrator at BN Paribas Cardif Portugal and other significant companies in Brazil, including an affiliate of Rede Globo Television (Rede Bahia) and Petrobras SA. In these roles, I developed a robust skill set, acquired the ability to adapt to new processes, demonstrated excellent problem-solving and analytical skills, and managed ticket systems to enhance the customer service experience.
My ability to thrive in high-pressure environments and meet tight deadlines is a testament to my organizational and proactive approach. By collaborating with colleagues and other teams, I ensure robust support and incident management, contributing to the consistent satisfaction of my customers and the reliability of the entire IT Infrastructure.
📝Introduction
In this hands-on lab, we will apply patch updates and upgrade the AKS cluster to the latest supported Kubernetes version.

Learning objectives
In this module, you'll learn how to:
Understand what Kubernetes versions AKS supports.
Upgrade your existing AKS cluster components to the latest supported Kubernetes version.
Upgrade your AKS clusters in production environments using a Blue/Green deployment.
📝Log in to the Azure Management Console
Using your credentials, make sure you're using the right Region. In my case, I am using the region southcentralus in my Cloud Playground Sandbox.
📌Note: You can also use the VSCode tool or from your local Terminal to connect to Azure CLI
More information on how to set it up is at the link.
📝Prerequisites:
Update to PowerShell 5.1, if needed.
Install .NET Framework 4.7.2 or later.
Visual Code
Web Browser (Chrome, Edge)
Azure CLI installed
Azure subscription
Docker installed
📝Setting an Azure Storage Account to Load Bash or PowerShell
- Click the Cloud Shell icon
(>_)at the top of the page.

- Click PowerShell.

- Click Show Advanced Settings. Use the combo box under Cloud Shell region to select the Region. Under Resource Group and Storage account(It's a globally unique name), enter a name for both. In the box under File Share, enter a name. Click ***Create storage (***if you don't have any yet).


📝Create an AKS cluster
In Azure Cloud Shell, create a resource group using the
az group createcommand.az group create -l <location> -n <ResourceGroupName>Check the current list of Kubernetes versions that AKS supports using the
az aks get-versionscommand.az aks get-versions -l <location> -o table
Find the oldest supported Kubernetes version from the list and store it in a KV variable.
KV=1.27.7Get your resource group name and store it inside a variable named RG.
az group list -o table RG=<ResourceGroupName>Create an AKS cluster using the
az aks createcommand, but before storing the name of the cluster inside a variable named CLUSTERNAME.CLUSTERNAME=<AKSClusterName> az aks create -n $CLUSTERNAME -g $RG --kubernetes-version $KV --node-vm-size Standard_D2s_v3 --node-count 2 --generate-ssh-keys
📝Upgrade the AKS cluster
- Check for available cluster upgrades using the
az aks get-upgradescommand.
az aks get-upgrades -n $CLUSTERNAME -g $RG -o table
You'll see the versions available for upgrades, which are the next three supported Kubernetes versions from the current AKS cluster version.

Try to immediately upgrade to the latest supported Kubernetes version using the
az aks upgradecommand and replace[latest-version]with the latest Kubernetes version from the previous step.az aks upgrade -n $CLUSTERNAME -g $RG -k [latest-version]




Confirm the upgrade using the
az aks showcommand.az aks show -n $CLUSTERNAME -g $RG -o table
However, you might get an error message because you can't skip minor versions when upgrading your AKS cluster. This means depends on the running version you're using, for example, version 1.26.x maybe you can't immediately upgrade to version 1.28.x and above. In this case, you can skip patch version upgrades within a minor version and follow the next steps.
📝Apply patches updates
Apply patch updates to the AKS cluster using the
az aks upgradecommand and replace[next-patch-version]with the next patch version from the previous section.az aks upgrade -n $CLUSTERNAME -g $RG --no-wait -k [next-patch-version]📌Note: It's possible to apply upgrades only to the control plane in the AKS cluster or only to the nodes in the AKS cluster by including the optional parameters
--control-plane-onlyor--node-image-onlywhen running the upgrade command. If the optional parameters aren't included, both the control plane and nodes in the AKS cluster are upgraded.Confirm the patch upgrade using the
az aks showcommand.az aks show -n $CLUSTERNAME -g $RG -o table
📝Upgrade to the next minor version
Upgrade the AKS cluster to the next supported Kubernetes minor version using the
az aks upgradecommand and replace[next-minor-version]with the next minor version from the previous section.az aks upgrade -n $CLUSTERNAME -g $RG --no-wait -k [next-minor-version]Confirm the upgrade using the
az aks showcommand.az aks show -n $CLUSTERNAME -g $RG -o tableUpgrade the cluster to the latest stable Kubernetes version AKS supports using the
az aks upgradecommand and replace[latest-stable-version]with the latest stable version from the previous section.az aks upgrade -n $CLUSTERNAME -g $RG --no-wait -k [latest-stable-version]Confirm the upgrade using the
az aks showcommand.az aks show -n $CLUSTERNAME -g $RG -o table
📌Note - At the end of each hands-on Lab, always clean up all resources previously created to avoid being charged.
Congratulations — you have completed this hands-on lab covering the basics of applying patch updates and upgrading the AKS cluster to the latest supported Kubernetes version.
Thank you for reading. I hope you understood and learned something helpful from my blog.
Please follow me on Cloud&DevOpsLearn and LinkedIn, franciscojblsouza






