Create your FREE Codefresh account and start making pipelines fast. Create Account
Three ways to identify which images are running in a Kubernetes cluster

Three ways to identify which images are running in a Kubernetes cluster

2 min read

There are three ways to get information about the images running in Kubernetes.

Using Kubectl

The easiest way to find out which image is running is to parse the Kubernetes json api. This command will show you every image running in a cluster. To narrow it down to a namespace just change –all-namespaces  to –namespace=mynamespace

Here’s the command

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

This will parse the json using some regex. It’s not particularly useful, especially if you have lots of images!

Using the Kubernetes UI

Fire up kubectl proxy and look under workloads. You’ll see something like this:

One of the limitations here is that if the image name is really long (like if you’re using a private registry url) it will be truncated so you may not actually be able to see the image.

Which is why I recommend using Codefresh.

Using Codefresh (Bonus info)

Once you’ve connected your cluster to Codefresh, just navigate to the Kubernetes -> Services page.

You can filter out multiple clusters, namespaces etc to get a view like this.

Here you can see in this namespace I have two images deployed. One is mongo:latest and the other is a private image I built and deployed. The bonus here is that you can click on that image to get a full report about it.

Here I get way more information about the image including testing data and the commit id. One more click and I can even see the diff of what changes went into an image.


So there you have it! The first two methods have a lot of limitations. Using Codefresh ultimately gives you a lot more information. Go ahead and signup, it’s free!

Bonus Video

Dan Garfield

Dan is the Co-Founder and Chief Open Source Officer at Codefresh. His work in open source includes being an Argo Maintainer, and co-chair of the GitOps Working Group. As a technology leader with a background in full-stack engineering, evangelism, and communications, he led Codefresh's go-to-market strategy and now leads open source strategy. You can follow him at