How can you see which pods use a PVC before deleting it?
BeginnerScenarioConfiguration, Secrets and storage
Answer
Situation read → A PVC stuck in Terminating after delete.
What I'd do →
kubectl describe pvc datashowsUsed Bykubectl get pods -A -o json | jqfor claimName matching- Delete or scale down the pods using it
- The
kubernetes.io/pvc-protectionfinalizer clears once no pod uses it - Verify with
kubectl get pvc
Why → Storage protection finalizers stop in-use claims from being deleted.
Interview tip → Do not patch finalizers off before checking for users.
More on Configuration, Secrets and storage
How do you inject configuration into pods and what are the options?BeginnerA ConfigMap was updated but the pod still shows old values. Why?IntermediateHow do you store a database password safely in Kubernetes?BeginnerHow do you manage secrets in GitOps without committing them in plain text?IntermediateA pod fails with `CreateContainerConfigError` and a missing key. What happened?BeginnerWhat is the difference between emptyDir, hostPath, PV/PVC and when do you use each?Beginner