How to patch and schedule Azure kubernestes nodes on VMSS

Azure-learning 56 Reputation points
2023-01-06T07:11:33.39+00:00

what is the recommended way to patch Azure kubernetes nodes on VMSS or is it something Microsoft manage from their end for OS update .

if not what is the recommended way of doing and planning the scheduled patches on these aks nodes(vmss)

Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,461 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Andrei Barbu 2,596 Reputation points Microsoft Employee
    2023-01-06T07:23:32.5+00:00

    Hello @Azure-learning !

    Thank you for raising the question.

    In Azure Kubernetes Service (AKS), nodes of the same configuration are grouped together into node pools. These node pools contain the underlying VM/VMSS.

    Please be informed that the OS (Linux or Windows) patches are included in the node image used by the AKS node (also called VM or instance). AKS provides one new image almost weekly with the latest updates. That is to address vulnerabilities, bring new features, fix issues etc. The node images can be tracked here:
    https://github.com/Azure/AKS/tree/master/vhd-notes

    You can patch/upgrade the node image of a node pool referring to the below command:

    az aks nodepool upgrade \
    --resource-group myResourceGroup \
    --cluster-name myAKSCluster \
    --name mynodepool \
    --node-image-only

    or to all the node pools (if you have more) with:

    az aks upgrade \
    --resource-group myResourceGroup \
    --name myAKSCluster \
    --node-image-only

    Reference link: https://learn.microsoft.com/en-us/azure/aks/node-image-upgrade

    If you would like to automate this, you can use auto-upgrade feature with node-image channel. Auto-upgrade works with planned maintenance feature if you'd like the upgrades to happen only at a specific time.

    Please note that this will always bring you the latest node image version and you cannot choose a specific version.

    Additionally, it is important to know that the default distribution used in AKS is Ubuntu. You can also go for Mariner, please refer to the following for that: https://learn.microsoft.com/EN-us/azure/aks/use-mariner

    Until Kubernetes version 1.24 (including), Ubuntu 18.04 is used. From Kubernetes version 1.24, Ubuntu 22.04 will be used. More information: https://azure.microsoft.com/en-us/updates/generally-available-aks-support-for-ubuntu-2204/

    I hope this answers your question.

    If the ANSWER is helpful, please click "Accept Answer" and upvote it.

    Thank you!

    2 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.