Interview Prep/Kubernetes/Rapid-Fire Commands

How do you find why a Pod is Pending or not starting?

BeginnerProductionRapid-Fire Commands
Answer
kubectl describe pod <pod> -n <ns>      # read the Events section at the bottom
kubectl get events -n <ns> --sort-by=.lastTimestamp

Common reasons: FailedScheduling, ImagePullBackOff, unbound PVC, missing Secret/ConfigMap.

All Kubernetes questions

More on Rapid-Fire Commands