Catégorie : Kubernetes (AKS)

AKS | Image Cleaner

Hi!

In this article, I will show you how you can clean unreferenced images stored at the nodes level. When done manually, this process can be time intensive, which ImageCleaner can mitigate via automatic image identification and removal.

ImageCleaner does not support the following:

  • Windows node pools
  • ARM64 node pools

When enabled, an eraser-controller-manager pod is deployed on each agent node, which will use an ImageList CRD to determine unreferenced and vulnerable images. Vulnerability is determined based on a trivy scan, after which images with a LOW, MEDIUM, HIGH, or CRITICAL classification are flagged.

An updated ImageList will be automatically generated by ImageCleaner based on a set time interval, and can also be supplied manually. Once an ImageList is generated, ImageCleaner will remove all the images in the list from node VMs.

To enable Image Cleaner on an existing AKS cluster:

az aks update -g MyResourceGroup -n MyManagedCluster --enable-image-cleaner

To enable Image Cleaner with an interval of hours:

az aks update -g MyResourceGroup -n MyManagedCluster --image-cleaner-interval-hours 48

Based on your configuration, ImageCleaner will generate an ImageList containing non-running and vulnerable images at the desired interval. ImageCleaner will automatically remove these images from cluster nodes.

Source: https://docs.microsoft.com/en-us/azure/aks/image-cleaner

Maxime.

AKS | Start and Stop Node Pool

Hi!

Your AKS workloads may not need to run continuously, for example a development cluster that has node pools running specific workloads. To optimize your costs, you can completely turn off (stop) your node pools in your AKS cluster, allowing you to save on compute costs.

Stop an AKS Node Pool:

az aks nodepool stop --nodepool-name testnodepool --resource-group myResourceGroup --cluster-name myAKSCluster

Start an AKS Node Pool:

az aks nodepool start --nodepool-name testnodepool --resource-group myResourceGroup --cluster-name myAKSCluster

Maxime.

AKS | Deprecated Labels

Hi!

The following labels are planned for deprecation with the release of Kubernetes v1.24. Customers should change any label references to the recommended substitute.

LabelRecommended substituteMaintainer
failure-domain.beta.kubernetes.io/regiontopology.kubernetes.io/regionKubernetes
failure-domain.beta.kubernetes.io/zonetopology.kubernetes.io/zoneKubernetes
beta.kubernetes.io/archkubernetes.io/archKubernetes
beta.kubernetes.io/instance-typenode.kubernetes.io/instance-typeKubernetes
beta.kubernetes.io/oskubernetes.io/osKubernetes
node-role.kubernetes.io/agent*kubernetes.azure.com/role=agentAzure Kubernetes Service
kubernetes.io/role*kubernetes.azure.com/role=agentAzure Kubernetes Service
Agentpool*kubernetes.azure.com/agentpoolAzure Kubernetes Service
Storageprofile*kubernetes.azure.com/storageprofileAzure Kubernetes Service
Storagetier*kubernetes.azure.com/storagetierAzure Kubernetes Service
Accelerator*kubernetes.azure.com/acceleratorAzure Kubernetes Service

Maxime.