Hello @Mario ,
Trying to clarify your follow-up question(s):
After NodeD gets created , the Pods from NodeA can be re-created on any other nodes (it can be new nodeD or any of the previous un-upgrade Nodes) unless you have any constraints defined for the Pod (like Taint etc).
I was testing locally by deploying Pods in each of the 3 nodes and did an upgrade - this is how it went on:
Initially:
NodeA - PodA
NodeB - PodB
NodeC - PodC
Upgrade Initiated:
NodeD - Created
Observed that PodA created on NodeB
NodeB has got : PodA , PodB
NodeA upgrade Completed.
NodeB Drained - Pods from NodeB created on NodeA , NodeD
NodeB upgrade completed
NodeC upgrade started , Pods from NodeC moved to NodeB
Once NodeC upgrade completed , NodeD drained and Pods from NodeD moved to NodeC.
////////////////
Check out the document:
https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster#upgrade-an-aks-cluster
1) add a new buffer node (or as many nodes as configured in max surge) to the cluster that runs the specified Kubernetes version.
2) cordon and drain one of the old nodes to minimize disruption to running applications (if you're using max surge it will cordon and drain as many nodes at the same time as the number of buffer nodes specified).
3) When the old node is fully drained, it will be reimaged to receive the new version and it will become the buffer node for the following node to be upgraded.
4) This process repeats until all nodes in the cluster have been upgraded.
5) At the end of the process, the last buffer node will be deleted, maintaining the existing agent node count and zone balance.
//Regarding your second follow-up question: why not just creating a new node for every node to upgrade//
There is a setting at nodepool level i.e. max-surge (this can control how many nodes to be upgraded at a time)
Update max surge for an existing node pool with 3 nodes
az aks nodepool update -n mynodepool -g MyResourceGroup --cluster-name MyManagedCluster --max-surge 3
After updating your node pool with above maxsurge setting to 3 , if your node pool has got 3 nodes - at the time of upgrade - It will create 3 additional buffer nodes and all the PODS will get transferred to those 3 buffer nodes etc. After upgrade has completed , those PODS will be re-created back in original nodes.
Kindly let us know if you have additional questions.
Make sure to Upvote & Accept the answers wherever applicable
Regards,
Shiva.