'List local container images in AKS nodes

I was able to get into an Azure Kubernetes Service (AKS) node by referring to Connect to Azure Kubernetes Service (AKS) cluster nodes for maintenance or troubleshooting.

I am trying to list the images present in the worker node. Do I need to install anything like nerdctl/crictl in the nodes or is there any other command I can use which is readily available in the nodes?

In short, what's the alternative for Docker commands in AKS worker nodes?

containerd://1.4.9+azure is the CONTAINER-RUNTIME



Solution 1:[1]

Check Why and how to use containerd from the command line. I am not sure if it helps or not. But it does have containerd commands to check.

The reference is Debugging Kubernetes nodes with crictl.

Use these commands to check:

sudo crictl --help
sudo crictl ps
sudo crictl images

Solution 2:[2]

It seems that you are using it inside the container. Go to the host process with chroot /host and use it.

The image is --image=mcr.microsoft.com/dotnet/runtime-deps:6.0. I used this.

Solution 3:[3]

You can try using ctr cli tool which come prepackaged with containerd.

ctr -n <namespace> image list

NOTE: for checking the namespace kindly run

ctr ns list

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Peter Mortensen
Solution 2 Peter Mortensen
Solution 3 Mayank Upasak