PVC Volume not detached if pod deleted via namespace deletion #29051
Labels
kind/bug
Categorizes issue or PR as related to a bug.
priority/important-soon
Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
sig/storage
Categorizes an issue or PR as relevant to SIG Storage.
Milestone
Problem:
An attachable volume referenced by a pod via a PVC object (instead of directly) is not detached if the pod is deleted via namespace deletion (i.e. deleting the pod's namespace instead of the pod object directly).
Repro steps:
gcloud compute disks create --zone=us-central1-b test-0b
kubectl create ns testns
namespace "testns" created
kubectl create -f volumetest_pvc-pv.yaml
persistentvolume "pv-test-detach" created
persistentvolumeclaim "claim-test-detach" created
kubectl get pv
pv-test-detach 50Gi RWO Bound testns/claim-test-detach 2m
kubectl create -f volumetest_pod_pvc.yaml
replicationcontroller "sleepypod" created
kubectl get pods --namespace testns
sleepypod-0b0eq 1/1 Running 0 3m
kubectl delete ns testns
namespace "testns" deleted
kubectl get pods --namespace testns
And
volumetest_pod_pvc.yaml
is:Workarounds:
kubectl delete -f volumetest_pod_pvc.yaml
insteadThe text was updated successfully, but these errors were encountered: