On my kubernetes cluster, I mapped persistenet volumn but some how my cluster get restarted, and rabbitmq is failing to start, So I try to delete the PVC using
kubectl delete pvc pvc-475317d7-5c92-4aec-9187-5760424a2c02
comamnd,
but it stucked in Lost status, now My deployment Pod is failing with error
could not find v1.PersistentVolume "pvc-475317d7-5c92-4aec-9187-5760424a2c02" (repeated 4 times)
when I execute kubectl get pvc
it gives
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
data-rabbitmq-0 Lost pvc-475317d7-5c92-4aec-9187-5760424a2c02 0 do-block-storage 177d
data-rabbitmq-1 Lost pvc-17d19163-6112-49e8-b38a-18e62d677ee8 0 do-block-storage 177d
Can someone please help me how to solve this ?
Thanks Alpesh
The command you should be doing is kubectl delete pvc data-rabbitmq-0
pvc-475317d7-5c92-4aec-9187-5760424a2c02
is the name of the volume (pv)
You will get a better understanding once you see the output of kubectl get pv