Skip to content

Instantly share code, notes, and snippets.

@ldelelis

ldelelis/,dig-pool

Created Jan 26, 2021
Embed
What would you like to do?
Print all pods on each instance of a given kubernetes node pool
#!/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