Skip to content

Instantly share code, notes, and snippets.

Created Jan 26, 2021
What would you like to do?
Print all pods on each instance of a given kubernetes node pool
kubectl get node | grep $1 | awk '{print $1}' | while read instance; do printf "\ninstance: $instance\n======\n"; kubectl get po -A --no-headers --field-selector spec.nodeName=$instance; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment