Created
January 13, 2020 15:26
-
-
Save 15below-adamhancock/11850dd93c73dc92cb5a51076c09789a to your computer and use it in GitHub Desktop.
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
# Number of pods not in Running state | |
kubectl get pods --all-namespaces | sed 's/\s\s*/ /g' | awk '{if(NR>1)print}' | cut -d ' ' -f4 | grep -vx 'Running' | wc -l | |
# Number of Nodes not in Ready state. | |
kubectl get nodes | sed 's/\s\s*/ /g' | awk '{if(NR>1)print}' | cut -d ' ' -f2 | grep -xv 'Ready' | wc -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment