Back to all scenarios
Scenario #362
Storage
Kubernetes v1.23, StatefulSet with volumeClaimTemplates
StatefulSet Pod Replacement Fails Due to PVC Retention
Deleted a StatefulSet pod manually, but new pod failed due to existing PVC conflict.
Find this helpful?
What Happened
PVC persisted after pod deletion due to StatefulSet retention policy.
Diagnosis Steps
- 1kubectl get pvc showed PVC still bound.
- 2New pod stuck in Pending.
Root Cause
StatefulSet retains PVCs unless explicitly deleted.
Fix/Workaround
• Deleted old PVC manually to let StatefulSet recreate it.
Lessons Learned
Stateful PVCs are tightly coupled to pod identity.
How to Avoid
- 1Use persistentVolumeReclaimPolicy: Delete only when data can be lost.
- 2Automate cleanup for failed StatefulSet replacements.