DEV Community

Janardhan Pulivarthi
Janardhan Pulivarthi

Posted on • Edited on

PVC stuck in terminating state?

# kubectl get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE service-vol-0 Terminating pvc-1517f4d4-48ac-4892-9618-5bc3bfb255db 1Gi RWO sc 33d 
Enter fullscreen mode Exit fullscreen mode

Add the finalizer all null, in place of kubernetes.io/pv-protection to be able to delete.

kubectl patch pvc service-vol-0 -p '{"metadata":{"finalizers":null}}' 
Enter fullscreen mode Exit fullscreen mode

docs to know more about pv-protection: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#storage-object-in-use-protection

Top comments (0)