Skip to content

Instantly share code, notes, and snippets.

@jefflaplante
Last active July 3, 2017 19:00
Show Gist options
  • Save jefflaplante/e85db3acffbefa46b86ab6a593ac072b to your computer and use it in GitHub Desktop.
Save jefflaplante/e85db3acffbefa46b86ab6a593ac072b to your computer and use it in GitHub Desktop.
Get all images for all pods in a kubernetes cluster
kubectl get pods --all-namespaces -o go-template='{{ range .items }}{{- printf "%-5s\t%-45s\t%-20v\t" .metadata.namespace .metadata.name .status.startTime}}{{- range .spec.containers }}{{- printf "%s " .image }}{{- end }}{{- printf "\n" }}{{- end }}'
@jefflaplante
Copy link
Author

simplified printing of multiple values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment