Free-up Azure AKS disk space
If your Kubernetes Azure AKS cluster is old enough, especially in development environments, it will definitely run out of disk space, because AKS will store all container images (and in DEV environments they're changing quite often) on the disk.
I wasn't able to find, how often AKS engine is executing some clean operation (but it does, absolutely). However, in my case, space usage reached those already critical 80% and continued to grow. Here's how can run cleaning manually.
Connect to the node
First thing you need to do is to connect to the Azure AKS cluster node. Microsoft has nice guide regarding this: https://learn.microsoft.com/en-us/azure/aks/node-access#create-an-interactive-shell-connection-to-a-linux-node.
When you're in the node, execute the following commands and everything's done! The command will look and remove all unused container images from the disk.
chroot /host crictl rmi -prune
- Hits: 1107