How Do You Find Which Docker Images Your Kubernetes Cluster Pods Are Using?

Problem scenario
You want to know the Docker images of the pods running in your Kubernetes cluster(s).  How do you determine this?

From your Kubernetes server, run this single multi-line command:

kubectl get pods --all-namespaces -o jsonpath="{..image}" |\
tr -s '[[:space:]]' '\n' |\
sort |\
uniq -c

It was taken from this link.

Leave a comment

Your email address will not be published. Required fields are marked *