kaka
kaka

Reputation: 183

Azure kubernetes service node pool upgrades & patches

I have some confusion on AKS Node pool upgrades and Patching. Could you please clarify on this.

  1. I have one AKS node pool, which is having 4 nodes, so now I want to upgrade the kubernetes version only in two nodes of node pool. Is it possible?

    if it is possible to upgrade in two nodes, then how we can upgrade remaining two nodes? and how we can find out which two nodes are having old kubernetes version instead of latest kubernetes version

  2. While doing the Upgrade process, will it create two new nodes with latest kubernetes version, and then will it delete old nodes in node pool?

  3. Actually azure automatically applies patches on nodes, but will it creates new nodes with new patches and deleted old nodes?

Upvotes: 1

Views: 5145

Answers (2)

Mark
Mark

Reputation: 4067

1. According to the docs:

So the approach with additional node-pool mentioned by 4c74356b41.


  • Additional info:

Node upgrades

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:

  • 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.


Upvotes: 3

4c74356b41
4c74356b41

Reputation: 72191

  1. no, create another pool with 2 nodes and test your application there. or create another cluster. you can find node version with kubectl get nodes
  2. it gradually updates nodes one by one (default). you can change these. spot instances cannot be upgraded.
  3. yes, latest patch version image will be used

Upvotes: 1

Related Questions