Created
January 26, 2021 17:40
-
-
Save ldelelis/309c04cfb4edc407a1114efe4ceb0f2a to your computer and use it in GitHub Desktop.
Print all pods on each instance of a given kubernetes node pool
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
#!/bin/sh | |
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