Kubernetes Framework - AKS Cluster Upgrade Guide
Check for Available AKS Cluster Upgrade
Navigate to Azure Portal:
Go to the Azure portal and search for Kubernetes services.
Check Current AKS Version:
Click on the Upgrade version option for the client you are upgrading to view the current AKS version.
Note:
When upgrading a supported AKS cluster, you can't skip Kubernetes minor versions. You must perform all upgrades sequentially by major version number. For example:
Upgrades between
1.14.x -> 1.15.x
or1.15.x -> 1.16.x
are allowed.Upgrades from
1.14.x -> 1.16.x
are not allowed.
You can skip multiple versions only when upgrading from an unsupported version back to a supported version. For example:
Upgrades from an unsupported
1.10.x
to a supported1.12.x
are allowed if available.
For example, you can perform an upgrade from an unsupported 1.10.x to a supported 1.12.x if available.
Upgrade an AKS Cluster
Back-Up and Delete PDB Policy:
To upgrade the AKS cluster, you must have contributor access to your user.
Backup PDBs:kubectl get pdb -A -o yaml > backup.yaml
Delete PDBs:kubectl delete --all pdb -A
Check PDBs:kubectl get pdb -A
Upgrade AKS Cluster:
Execute the following command to upgrade the AKS cluster:
az aks upgrade --resource-group <myResourceGroup> --name <myAKSCluster> --kubernetes-version <KUBERNETES_VERSION>
Example:az aks upgrade --resource-group stinsco1-ResGroup --name stinsco1-akscluster1-eastus --kubernetes-version 1.28.9
Restore PDB Policy:
Restore PDBs:kubectl apply -f backup.yaml
Check PDBs:kubectl get pdb -A
Confirm Upgrade:
To confirm the successful upgrade, recheck the cluster configuration:az aks show --resource-group <myResourceGroup> --name <myAKSCluster> --query kubernetesVersion
Or again check the cluster configuration from the Azure portal.