Q: You deleted a PVC but the data is gone. How could you have protected it?
By setting the Reclaim Policy on the PV or StorageClass:
#Kubernetes #Storage #L2 #Container Orchestration #K8s
🎙️ Candidate Opening & Architectural Context
""When troubleshooting Kubernetes, I always follow a structured layered model: Pod status -> Events -> Logs -> Network. 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
By setting the Reclaim Policy on the PV or StorageClass:
Delete(default for dynamic provisioning) — deletes the underlying volume when PVC is deleted. Data is gone.Retain— PV stays after PVC deletion. Data is preserved. Admin must manually reclaim.Recycle— deprecated, performed basic cleanup.
2️⃣
Remediation & Permanent Safeguards
Also: use VolumeSnapshot to take backups before deleting. Or enable backup tools like Velero that snapshot PVC data. Lesson: Always check the StorageClass reclaim policy in production. Default Delete on cloud providers will wipe your data.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Delete (default for dynamic provisioning) — deletes the underlying volume when PVC is deleted. Data is gone.."
⚡ 60-Second Elevator Pitch Talking Points
- Delete (default for dynamic provisioning) — deletes the underlying volume when PVC is deleted. Da...
- Retain — PV stays after PVC deletion. Data is preserved. Admin must manually reclaim.
- Recycle — deprecated, performed basic cleanup.
Advertisement