Search code examples
dockerazure-akscontainerd

how to check docker containers and images inside aks nodes


how to check running docker containers and images for the deployed pods inside aks nodes?

I have deployed company pods and services inside the azure aks cluster.

Need to login as a root user inside containers running inside nodes of managed aks cluster. Those containers are of rabbitmq pods deployed with bitnami helm chart.

I was able to login into worker nodes by following this link https://learn.microsoft.com/en-us/azure/aks/node-access, but couldn't find the docker package running/installed inside them.

They do have containerd://1.4.9+azure as the CONTAINER-RUNTIME. Tried below commands of 'containerd' inside those nodes, but nothing came, empty response, no running containers or downloaded images.

ctr  container ls
ctr images ls

So how to check running docker containers and images for the deployed pods inside aks nodes?


Solution

  • We can use the below commands to check running containers inside worker nodes of managed k8s clusters at least in the case of aks clusters.

    Here's the reference link https://kubernetes.io/docs/tasks/debug-application-cluster/crictl/

    use below commands

    sudo crictl --help
    sudo crictl ps
    sudo crictl images