Helpful kubectl
Commands
List All Pods in a Bad State
#!/bin/bash
if [ $# -gt 0 ]; then
KUBECTL_OPTS="$*"
else
KUBECTL_OPTS=-A
fi
kubectl get pods ${KUBECTL_OPTS} | grep -v -e Running -e Completed
kubectl get pods ${KUBECTL_OPTS} | grep Running | grep -vE '(1/1|2/2|3/3|4/4|5/5|6/6)'
kubectl get pods ${KUBECTL_OPTS} | grep wait-for.*Running