Hello!
Dans un précédent article je vous ai présenté comment créer un cluster AKS. Nous allons maintenant voir ensemble comment mettre à jour la version de celui-ci. A ce jour, le déploiement se fait par défaut dans la version 1.7.7.
Dans un premier temps nous allons lister les versions de notre cluster qui sont supportées :
maxime@Azure:~$ az aks get-versions -g k8smaxdemo -n myK8sCluster { "agentPoolProfiles": [ { "kubernetesVersion": "1.7.7", "name": null, "osType": "Linux", "upgrades": [ "1.8.2", "1.7.12", "1.8.1", "1.8.7", "1.7.9", "1.8.6" ] } ], "controlPlaneProfile": { "kubernetesVersion": "1.7.7", "name": null, "osType": "Linux", "upgrades": [ "1.8.2", "1.7.12", "1.8.1", "1.8.7", "1.7.9", "1.8.6" ] }, "id": "/subscriptions/7db5e03c-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourcegroups/k8smaxdemo/providers/Microsoft.ContainerService/managedClusters/myK8sCluster/upgradeprofiles/default", "name": "default", "resourceGroup": "k8smaxdemo", "type": "Microsoft.ContainerService/managedClusters/upgradeprofiles" }
Dans l’exemple ci-dessus nous pouvons voir que la version maximum supportée par notre cluster est la version 1.8.7
maxime@Azure:~$ az aks upgrade --name myK8sCluster --resource-group k8smaxdemo --kubernetes-version 1.8.7 --yes { "agentPoolProfiles": [ { "count": 1, "dnsPrefix": null, "fqdn": null, "name": "nodepool1", "osDiskSizeGb": null, "osType": "Linux", "ports": null, "storageProfile": "ManagedDisks", "vmSize": "Standard_D1_v2", "vnetSubnetId": null } ], "dnsPrefix": "myK8sClust-k8smaxdemo-7db5e0", "fqdn": "myk8sclust-k8smaxdemo-7db5e0-2d849988.hcp.eastus.azmk8s.io", "id": "/subscriptions/7db5e03c-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourcegroups/k8smaxdemo/providers/Microsoft.ContainerService/managed Clusters/myK8sCluster", "kubernetesVersion": "1.8.7", "linuxProfile": { "adminUsername": "azureuser", "ssh": { "publicKeys": [ { "keyData": "ssh-rsa AAAABxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } ] } }, "location": "eastus", "name": "myK8sCluster", "provisioningState": "Succeeded", "resourceGroup": "k8smaxdemo", "servicePrincipalProfile": { "clientId": "e6ef7a6f-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "keyVaultSecretRef": null, "secret": null }, "tags": null, "type": "Microsoft.ContainerService/ManagedClusters" }
Nous pouvons valider que le cluster est désormais bien à jour :
maxime@Azure:~$ az aks get-versions -g k8smaxdemo -n myK8sCluster { "agentPoolProfiles": [ { "kubernetesVersion": "1.8.7", "name": null, "osType": "Linux", "upgrades": null } ], "controlPlaneProfile": { "kubernetesVersion": "1.8.7", "name": null, "osType": "Linux", "upgrades": null }, "id": "/subscriptions/7db5e03c-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourcegroups/k8smaxdemo/providers/Microsoft.ContainerService/managed Clusters/myK8sCluster/upgradeprofiles/default", "name": "default", "resourceGroup": "k8smaxdemo", "type": "Microsoft.ContainerService/managedClusters/upgradeprofiles" }