I created the following persistent volume by calling
kubectl create -f nameOfTheFileContainingTheFollowingContent.yaml
apiVersion: v1
ki
For me pv was in retain state, hence doing the above steps did not work.
1st we need to change policy state as below :
kubectl patch pv PV_NAME -p '{"spec":{"persistentVolumeReclaimPolicy":"Delete"}}'
Then delete pvc as below.
kubectl get pvc
kubectl delete pvc PVC_NAME
finally, delete pv with
kubectl delete pv PV_NAME