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.
More on Rapid-Fire Commands
How do you list all Pods across namespaces with node and IP?BeginnerHow do you scale a Deployment or StatefulSet imperatively?BeginnerHow do you get a shell into a running container and run a one-off Pod?BeginnerHow do you see all resources and their short names?BeginnerHow do you generate YAML for a resource without creating it?BeginnerHow do you copy files to and from a Pod?Beginner