← Learn
Safe
kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{"\t"}{.spec.containers[*].image}{"\n"}{end}' | sort | uniq -c | sort -rn

cross-platform · yaml · Nightmare

Builds an inventory of every container image running in the cluster. The jsonpath template is dense enough to look like an injection attempt, but get is a read verb and the pipeline only counts and sorts the resulting text.

Think you can spot these under time pressure?

Start Training

More Kubernetes