A pod is stuck in Pending / FailedScheduling. How do you diagnose it?
Quick Answer
The scheduler cannot place the pod on any node. Run kubectl describe pod to see the reason: insufficient CPU/memory, no node matching nodeSelector/affinity/taints, an unbound PVC, or no available nodes.
Detailed Answer
kubectl describe pod surfaces the FailedScheduling event with the exact constraint. Common blockers: requests larger than any node has free, taints without matching tolerations, node affinity/selector that no node satisfies, a PersistentVolumeClaim that cannot bind, or the cluster simply being at capacity (needs Cluster Autoscaler). kubectl get nodes and kubectl describe node help confirm capacity.
Code Example
kubectl describe pod <pod> | grep -A5 Events kubectl get nodes -o wide
Interview Tip
The reason is always in describe pod events — read it first, then map it to requests/taints/affinity/PVC/capacity.