Interview Questions/Phone Screen/Kubernetes Pod Stuck in Pending
IntermediatePhone
2 min

Kubernetes Pod Stuck in Pending

KubernetesContainersTroubleshooting
Advertisement
Interview Question

A pod is stuck in Pending state. What are the common causes and troubleshooting steps?

Key Points to Cover
  • Node resource limits: insufficient CPU/memory
  • Pending due to unschedulable taints/tolerations
  • StorageClass or PVC issues
  • Use `kubectl describe pod` and `kubectl get events` for details
Evaluation Rubric
Mentions CPU/memory limits30% weight
Explains unschedulable reasons30% weight
Suggests proper troubleshooting commands40% weight
Hints
  • 💡Think resource requests, PVCs, and taints/tolerations.
Common Pitfalls to Avoid
  • ⚠️Only checking `kubectl get pod` status and not using `kubectl describe pod` for detailed events.
  • ⚠️Forgetting to check the `PersistentVolumeClaim` and `StorageClass` status when the pod uses persistent storage.
  • ⚠️Overlooking node taints and pod tolerations as a cause, especially in clusters with specific node roles.
  • ⚠️Assuming all Pending issues are resource-related without verifying scheduling constraints like `nodeSelector` or affinity rules.
  • ⚠️Not checking `kubectl top nodes` or `kubectl describe node` for actual resource utilization and capacity on individual nodes.
Potential Follow-up Questions
  • How do you check node pressure?
  • What role do tolerations play?
Advertisement