Skip to content

Instantly share code, notes, and snippets.

@elsonrodriguez
Created November 5, 2015 05:25
Show Gist options
  • Save elsonrodriguez/1003536730b6d622039e to your computer and use it in GitHub Desktop.
Save elsonrodriguez/1003536730b6d622039e to your computer and use it in GitHub Desktop.
Kubectl bash magicks.
#get all nodes running pod with specified label
kubectl get pods -l “key=value" -o template --template='{{range .items }}{{.spec.nodeName}}{{"\n" | printf "%v"}}{{end}}’
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment