Created
April 16, 2017 02:04
-
-
Save jmhodges/3112590a33ef20aa434e5e3950df7c15 to your computer and use it in GitHub Desktop.
Grab pod name, container name, and container image from kubernetes with kubectl
This file contains hidden or 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
#!/bin/bash | |
kubectl get po --template '{{ range $i, $p := .items }}{{ range $j, $c := $p.spec.containers }}{{ printf "%s %s %s\n" $p.metadata.name $c.name $c.image }}{{ end }}{{ end }}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment