Skip to content

Instantly share code, notes, and snippets.

@dogterbox
Created May 16, 2024 03:56
Show Gist options
  • Save dogterbox/4e0bf4f278fbc3bd713da7ff30cdd92d to your computer and use it in GitHub Desktop.
Save dogterbox/4e0bf4f278fbc3bd713da7ff30cdd92d to your computer and use it in GitHub Desktop.
kubectl command for listing docker image tag in target namespace
kubectl get pods -n <namespace> -o jsonpath="{range .items[*]}{.spec.containers[0].name}{': '}{.spec.containers[0].image}{'\n'}{end}" | awk -F: '{printf "%-40s: %s\n", $1, $3}' | sort | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment