Q: A PVC is stuck in `Pending` state. What do you check?
1. No matching PV — check if a PV exists with matching storageClassName, accessMode, and enough capacity: kubectl get pv.
#Kubernetes #Storage #L2 #Container Orchestration #K8s #Terraform State
🎙️ Candidate Opening & Architectural Context
""In our production Kubernetes clusters running microservices on EKS/AKS, this was a classic operational challenge. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix.""
Advertisement
🛠️ Production Runbook & Step-by-Step Resolution
1️⃣
Initial Diagnostics & Root Cause Analysis
- No matching PV — check if a PV exists with matching
storageClassName,accessMode, and enough capacity:kubectl get pv. - StorageClass doesn't exist —
kubectl get storageclass. If the PVC references a storage class that doesn't exist, it stays Pending. - Dynamic provisioner not working — if using dynamic provisioning (like AWS EBS CSI driver), check if the CSI driver pods are running:
kubectl get pods -n kube-system | grep csi.
2️⃣
Remediation & Permanent Safeguards
Execute the resolution runbook and verify workload health:
- Volume binding mode — if the StorageClass has
volumeBindingMode: WaitForFirstConsumer, the PVC stays Pending until a pod that uses it is scheduled. That's normal behavior.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: No matching PV — check if a PV exists with matching storageClassName, accessMode, and enough capacity: kubectl get pv.."
⚡ 60-Second Elevator Pitch Talking Points
- No matching PV — check if a PV exists with matching storageClassName, accessMode, and enough capa...
- StorageClass doesn't exist — kubectl get storageclass. If the PVC references a storage class that...
- Dynamic provisioner not working — if using dynamic provisioning (like AWS EBS CSI driver), check ...
Advertisement