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!