question

Ludo-2024 avatar image
0 Votes"
Ludo-2024 asked Ludo-2024 answered

Upgrate kubernetes version on node pool

I already upgrade the cluster to the kubernetes version v1.19.7.

I have 2 node pool, 1 system (Standard_A2_v2) and 1 myapps (Standard_D3_v2).
I manage to upgrade the system node pool all along.

But I am stuck on the node pool of myapps.
The current version of the node pool is v1.17.16, and on portal the choice to select a superior version is not given.
Same on the cli side.

Would anyone have an idea how to proceed to upgrade the node pool?



azure-kubernetes-service
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

learn2skills avatar image
0 Votes"
learn2skills answered

Hi @Ludo-2024
Thank You for posting in Q & A.

Upgrade a specific node pool
https://docs.microsoft.com/en-us/azure/aks/node-image-upgrade#upgrade-a-specific-node-pool

Upgrade all nodes in all node pools
https://docs.microsoft.com/en-us/azure/aks/node-image-upgrade#upgrade-all-nodes-in-all-node-pools

Check if your node pool is on the latest node image
https://docs.microsoft.com/en-us/azure/aks/node-image-upgrade#check-if-your-node-pool-is-on-the-latest-node-image


There is an additional process in AKS that lets you upgrade a cluster. An upgrade is typically to move to a newer version of Kubernetes, not just apply node security updates. An AKS upgrade performs the following actions:

  1. A new node is deployed with the latest security updates and Kubernetes version applied.
    An old node is cordoned and drained.
    Pods are scheduled on the new node.
    The old node is deleted.

  2. By default, AKS uses one additional node to configure upgrades.
    You can control this process by increase --max-surge parameter
    To speed up the node image upgrade process, you can upgrade your node images using a customizable node surge value.

  3. Security and kernel updates to Linux nodes:
    In an AKS cluster, your Kubernetes nodes run as Azure virtual machines (VMs). These Linux-based VMs use an Ubuntu image, with the OS configured to automatically check for updates every night. If security or kernel updates are available, they are automatically downloaded and installed.
    Some security updates, such as kernel updates, require a node reboot to finalize the process. A Linux node that requires a reboot creates a file named /var/run/reboot-required. This reboot process doesn't happen automatically.

Refer - https://stackoverflow.com/questions/63501141/azure-kubernetes-service-node-pool-upgrades-patches
https://docs.microsoft.com/en-us/azure/aks/upgrade-cluster


If the Answer is helpful, please click Accept Answer and up-vote, this can be beneficial to other community members.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Ludo-2024 avatar image
0 Votes"
Ludo-2024 answered

I did already follow and tried those procedures.

When doing :

 az aks nodepool get-upgrades \
     --nodepool-name mynodepool \
     --cluster-name myAKSCluster \
     --resource-group myResourceGroup


I get the result:

{
"id": "/subscriptions/7145f70a-c670-4516-85b6-f7fc98855260/resourcegroups/rg-aks-bitflyer-jp/providers/Microsoft.ContainerService/managedClusters/aks-bitflyer-jp/agentPools/bitflyer/upgradeProfiles/default",
"kubernetesVersion": "1.17.16",
"latestNodeImageVersion": "AKSUbuntu-1604-2021.03.10",
"name": "default",
"osType": "Linux",
"resourceGroup": "rg-aks",
"type": "Microsoft.ContainerService/managedClusters/agentPools/upgradeProfiles",
"upgrades": [
{
"isPreview": null,
"kubernetesVersion": "1.17.16"
}
]
}

I want to upgrade to the v1.18, but the choice is not given in portal or on the cli.
the cluster is on v1.19

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Ludo-2024 avatar image
0 Votes"
Ludo-2024 answered

I finally manage to "force" it with my terraform.

But nothing from portal or the cli

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.