|
| 1 | +# Testing the upgrade scenario |
| 2 | + |
| 3 | +You can use this example to manually test the upgrade scenario. |
| 4 | + |
| 5 | +See existing AKS versions: |
| 6 | + |
| 7 | +``` |
| 8 | +% az aks get-versions --location centralus |
| 9 | +KubernetesVersion Upgrades |
| 10 | +------------------- ------------------------ |
| 11 | +1.28.3 None available |
| 12 | +1.28.0 1.28.3 |
| 13 | +1.27.7 1.28.0, 1.28.3 |
| 14 | +1.27.3 1.27.7, 1.28.0, 1.28.3 |
| 15 | +1.26.10 1.27.3, 1.27.7 |
| 16 | +1.26.6 1.26.10, 1.27.3, 1.27.7 |
| 17 | +1.25.15 1.26.6, 1.26.10 |
| 18 | +1.25.11 1.25.15, 1.26.6, 1.26.10 |
| 19 | +``` |
| 20 | + |
| 21 | +In this example we test an upgrade from 1.26.10 to 1.27.7. |
| 22 | + |
| 23 | +## Create the AKS cluster at version 1.26.10: |
| 24 | + |
| 25 | +``` |
| 26 | +terraform init -upgrade |
| 27 | +terraform apply -var="kubernetes_version=1.26.10" -var="orchestrator_version=1.26.10" |
| 28 | +``` |
| 29 | + |
| 30 | +Verify the AKS cluster version: |
| 31 | + |
| 32 | +``` |
| 33 | +az aks list -o table # check AKS version |
| 34 | +az aks get-credentials --resource-group <rg> --name <name> |
| 35 | +kubectl version # check api server version |
| 36 | +kubectl get nodes # check nodes version |
| 37 | +``` |
| 38 | + |
| 39 | +In the `az aks list` output you will have `KubernetesVersion` and `CurrentKubernetesVersion` both at 1.26.10 |
| 40 | + |
| 41 | +## Upgrade the AKS cluster control plane only to version 1.27.7 |
| 42 | + |
| 43 | +``` |
| 44 | +terraform apply -var="kubernetes_version=1.27.7" -var="orchestrator_version=1.26.10" |
| 45 | +``` |
| 46 | + |
| 47 | +Check the new versions: |
| 48 | + |
| 49 | + |
| 50 | +``` |
| 51 | +az aks list -o table # check AKS version |
| 52 | +kubectl version # check api server version |
| 53 | +kubectl get nodes # check nodes version |
| 54 | +``` |
| 55 | + |
| 56 | +In the `az aks list` output you will have `KubernetesVersion` and `CurrentKubernetesVersion` both at 1.27.7 |
| 57 | +The control plane version will be 1.27.7 and the nodes will be 1.26.10. |
| 58 | + |
| 59 | +## Upgrade the AKS cluster node pools to version 1.27.7 |
| 60 | + |
| 61 | +``` |
| 62 | +terraform apply -var="kubernetes_version=1.27.7" -var="orchestrator_version=1.27.7" |
| 63 | +``` |
| 64 | + |
| 65 | +Check the new versions: |
| 66 | + |
| 67 | +``` |
| 68 | +az aks list -o table # check AKS version |
| 69 | +kubectl version # check api server version |
| 70 | +kubectl get nodes # check nodes version |
| 71 | +``` |
| 72 | + |
| 73 | +In the `az aks list` output you will have `KubernetesVersion` and `CurrentKubernetesVersion` both at 1.27.7 |
| 74 | +The control plane version will be 1.27.7 and the nodes will be 1.27.7. |
0 commit comments