AKS | Node image upgrades

[English Below]

Bonjour,

Dans cet article nous allons voir ensemble comment mettre à jour l’images de vos nodes. Pour cela nous allons utiliser la fonctionnalité nodes images AKS qui est encore en pré-version au moment où j’écris cet article.

# Register the preview feature 

az feature register --namespace "Microsoft.ContainerService" --name "NodeImageUpgradePreview"

# Verify the feature is registered

az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService/NodeImageUpgradePreview')].{Name:name,State:properties.state}"

# Install the aks-preview extension 

az extension add --name aks-preview # Update the extension to make sure you have the latest version installed az extension update --name aks-preview

# Mettre à jour l'ensemble de vos nodes pour l'ensemble des node pools de votre cluster

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

kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.labels.kubernetes.azure.com\/node-image-version}{"\n"}{end}'

az aks show \ --resource-group myResourceGroup \ --name myAKSCluster
-----------------------------------------------------
# Mettre à jour un node pool spécifique
az aks nodepool upgrade \ --resource-group myResourceGroup \ --cluster-name myAKSCluster \ --name mynodepool \ --node-image-only

kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.labels.kubernetes.azure.com\/node-image-version}{"\n"}{end}'

az aks nodepool show \ --resource-group myResourceGroup \ --cluster-name myAKSCluster \ --name mynodepool

Maxime.

Hi,

In this article, I would like to share with you how we can upgrade all nodes in all node pool of your AKS cluster or you can upgrade a specific node pool.

# Register the preview feature 

az feature register --namespace "Microsoft.ContainerService" --name "NodeImageUpgradePreview"

# Verify the feature is registered 

az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService/NodeImageUpgradePreview')].{Name:name,State:properties.state}"

# Install the aks-preview extension 

az extension add --name aks-preview # Update the extension to make sure you have the latest version installed az extension update --name aks-preview

# Upgrade all nodes in all node pools

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

kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.labels.kubernetes.azure.com\/node-image-version}{"\n"}{end}'

az aks show --resource-group myResourceGroup --name myAKSCluster
----------------------------------------------------------
# Upgrade a specific node pool
az aks nodepool upgrade --resource-group myResourceGroup --cluster-name myAKSCluster --name mynodepool --node-image-only

kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.labels.kubernetes.azure.com\/node-image-version}{"\n"}{end}'

az aks nodepool show --resource-group myResourceGroup --cluster-name myAKSCluster --name mynodepool

Maxime.

Démarrez une conversation

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *