Fix PVC Resize Stuck or Failed
Debug PVC expansion failures in Kubernetes. Covers allowVolumeExpansion, filesystem resize, and offline vs online expansion.
π‘ Quick Answer: Debug PersistentVolumeClaim expansion failures. Covers allowVolumeExpansion, filesystem resize conditions, offline vs online expansion, and recovery from stuck resizes.
The Problem
This is a common issue in Kubernetes storage that catches both beginners and experienced operators.
The Solution
Step 1: Check Resize Status
kubectl describe pvc my-claim | grep -A5 "Conditions"
# Type: FileSystemResizePending
# Message: "Waiting for user to (re-)start a pod to finish resize"Step 2: Enable Volume Expansion
# Check if StorageClass allows expansion
kubectl get storageclass standard -o jsonpath='{.allowVolumeExpansion}'
# Must be true
# Enable it
kubectl patch storageclass standard -p '{"allowVolumeExpansion": true}'Step 3: Resize the PVC
# Edit PVC to increase size
kubectl patch pvc my-claim -p '{"spec":{"resources":{"requests":{"storage":"20Gi"}}}}'
# For offline-only resize (most block storage):
# 1. Scale down the pod
kubectl scale deployment myapp --replicas=0
# 2. Wait for resize to complete
kubectl get pvc my-claim -w
# 3. Scale back up
kubectl scale deployment myapp --replicas=1Step 4: Stuck Resize Recovery
# If resize is stuck, check PV status
kubectl describe pv <pv-name> | grep -A5 "Conditions"
# For cloud providers, check the volume in the cloud console
# AWS: EC2 > EBS > Volumes > check "modification" state
# Nuclear option: recreate PVC with snapshot
kubectl get volumesnapshotBest Practices
- Monitor proactively with Prometheus alerts before issues become incidents
- Document runbooks for your teamβs most common failure scenarios
- Use
kubectl describeand events as your first debugging tool - Automate recovery where possible with operators or scripts
Key Takeaways
- Always check events and logs first β Kubernetes tells you whatβs wrong
- Most issues have clear error messages pointing to the root cause
- Prevention through monitoring and proper configuration beats reactive debugging
- Keep this recipe bookmarked for quick reference during incidents

Recommended
Kubernetes Recipes β The Complete Book100+ production-ready patterns with detailed explanations, best practices, and copy-paste YAML. Everything in one place.
Get the Book βLearn by Doing
CopyPasteLearn β Hands-on Cloud & DevOps CoursesMaster Kubernetes, Ansible, Terraform, and MLOps with interactive, copy-paste-run lessons. Start free.
Browse Courses βπ Deepen Your Skills β Hands-on Courses
Courses by CopyPasteLearn.com β Learn IT by Doing
