Skip to content

Instantly share code, notes, and snippets.

@apinter
Created March 4, 2026 04:41
Show Gist options
  • Select an option

  • Save apinter/ba8778ba893b4fff7d73d145f6929296 to your computer and use it in GitHub Desktop.

Select an option

Save apinter/ba8778ba893b4fff7d73d145f6929296 to your computer and use it in GitHub Desktop.
list pods with currently running images
#!/bin/bash
for ns in $(kubectl get ns -o jsonpath="{.items[*].metadata.name}"); do
echo "Namespace: $ns"
kubectl get pods --namespace "$ns" -o jsonpath="{.items[*].spec.containers[*].image}"
echo -e "\n"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment