IntermediateScenario
10 min
Kubernetes Pod Stuck in Pending
KubernetesContainersSchedulingTroubleshooting
Advertisement
Interview Question
A pod has been stuck in Pending state for over 15 minutes. Walk me through how you would troubleshoot and resolve this issue.
Key Points to Cover
- Check events with kubectl describe pod for scheduling errors
- Verify node capacity and resource requests/limits
- Check taints, tolerations, and affinity rules
- Ensure images pull correctly and registry is accessible
- Scale node pool if resources exhausted
Evaluation Rubric
Uses kubectl describe to inspect pod events30% weight
Considers node/pod resource constraints30% weight
Checks scheduling constraints/affinity20% weight
Proposes fixes like scaling or limits20% weight
Hints
- 💡Often caused by insufficient resources or affinity rules.
Common Pitfalls to Avoid
- ⚠️Forgetting to check the 'Events' section in `kubectl describe pod`, which is the primary source of scheduling error messages.
- ⚠️Assuming node capacity is the only issue and not investigating taints, tolerations, or affinity rules.
- ⚠️Overlooking PVC binding and storage accessibility as a cause for pending pods, especially for stateful applications.
- ⚠️Spending too much time on one specific area and not moving systematically through the troubleshooting steps.
- ⚠️Not considering the health of the Kubernetes control plane components (scheduler, controller-manager) for more complex or cluster-wide issues.
Potential Follow-up Questions
- ❓How do you proactively prevent this?
- ❓How do you monitor cluster capacity?
Advertisement