Skip to content

Instantly share code, notes, and snippets.

@arashkaffamanesh
Created July 20, 2019 09:05
Show Gist options
  • Save arashkaffamanesh/44b5e030dd79afc0c851d37d911aa790 to your computer and use it in GitHub Desktop.
Save arashkaffamanesh/44b5e030dd79afc0c851d37d911aa790 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -euo pipefail
echo -e "Iterating...\n"
nodes=$(kubectl get node --no-headers -o custom-columns=NAME:.metadata.name)
for node in $nodes; do
echo "Node: $node"
kubectl describe node "$node" | sed '1,/Non-terminated Pods/d'
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment