Created
May 16, 2024 03:56
-
-
Save dogterbox/4e0bf4f278fbc3bd713da7ff30cdd92d to your computer and use it in GitHub Desktop.
kubectl command for listing docker image tag in target namespace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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