PVC stuck in terminating state?

j143

Janardhan Pulivarthi

Posted on November 14, 2022

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

💖 💪 🙅 🚩
j143
Janardhan Pulivarthi

Posted on November 14, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

What was your win this week?
weeklyretro What was your win this week?

November 29, 2024

Where GitOps Meets ClickOps
devops Where GitOps Meets ClickOps

November 29, 2024

How to Use KitOps with MLflow
beginners How to Use KitOps with MLflow

November 29, 2024

Modern C++ for LeetCode 🧑‍💻🚀
leetcode Modern C++ for LeetCode 🧑‍💻🚀

November 29, 2024