How AKS upgrades with multiple node pools?

Tanul 1,251 Reputation points
2023-05-19T15:21:31.76+00:00

Hello,

Consider we have 2 node pools with 2 machines each. After initiating the complete upgrade i.e. control plane + node pool together, does AKS upgrade each node one by one or it will pick 1 node per node pool and start upgrading them in parallel.

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,877 questions
Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
352 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andrei Barbu 2,576 Reputation points Microsoft Employee
    2023-05-20T06:03:31.76+00:00

    Hello @Tanul

    By default, it will add a buffer node and then take each node, one by one to upgrade. That is because the default max-surge value is 1. That is until Kubernetes version 1.27. From Kubernetes version 1.27, the default max-surge value will be 10%, meaning, for example, if you have 20 nodes, it will upgrade 2 nodes at the same time.

    Reference link: https://github.com/Azure/AKS/releases/tag/2023-03-26

    If you'd like to control the number of nodes that are being upgraded at the same time, you can customize the surge value as per https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster?tabs=azure-cli#customize-node-surge-upgrade

    Hopefully this is what you are looking for! If you have additional questions, please let us know in the comments.

    If this has been helpful, please take a moment to accept answers as this helps increase visibility of this question for other members of the Microsoft Q&A community. Thank you for helping to improve Microsoft Q&A!

    User's image

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Prrudram-MSFT 22,396 Reputation points
    2023-05-20T18:29:21.21+00:00

    Hello @Tanul

    In addition to what the other AKS experts answered, I am just adding my response to confirm on the upgrade behavior.

    Q) Does AKS upgrade each node one by one, or will it pick one node per node pool and start upgrading them in parallel?

    A) When you initiate a complete upgrade of an AKS cluster, the control plane and all node pools are upgraded together.
    During the upgrade process, AKS upgrades nodes in parallel, but it upgrades nodes within a node pool one at a time. AKS upgrades one node pool at a time, and it upgrades nodes within a node pool one at a time to ensure that the cluster remains available during the upgrade process.

    This upgrade process is designed to minimize disruption to your workloads running on the cluster. However, it's important to note that during the upgrade process, your workloads may experience some disruption or downtime.

    Please "accept answer" and upvote if the above information is helpful for the benefit of the community.

    1 person found this answer helpful.
    0 comments No comments

  2. Cristian Gatjens 716 Reputation points Microsoft Employee
    2023-05-19T15:31:26.21+00:00

    Hello @Tanul ,

    Thanks for reaching out and I hope you are doing well.

    Could you please check the following documentation where describes how the upgrade process works?

    https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster?tabs=azure-cli#upgrade-an-aks-cluster

    If you have any further questions please reach out.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    Hope this helps!

    0 comments No comments