If I have a persistent volume which was previously claimed a a recycle policy of . . .

Simon Taylor:
If I have a persistent volume which was previously claimed a a recycle policy of retain how do i release the volume such that it can be claimed by another persistent volume claim? I tried a recycler pod and its still showing up as claimed by the previous pvc

Basavraj Nilkanthe:
@Simon Taylor When you use reclaimPolicy: retain - it doesnt mean by default kubernetes retain PV to use for another claim… It is just helping you to keep PV still in cluster by deleting PVC and it is just changing status to released but you cant use that PV as it has still data associated (pod which uses pvc and ingesting data or may be existing data) so you have to manually do the clean up activity…
It may include deleting pv and then corresponding storage if they are cloud specific and then creating new pv and attaching cleaned storage

Basavraj Nilkanthe:
what is recommendation from kubernetes stand point of view when using it in the cloud and use dynamic provision, it does taking caring of creating PV and corresponding storage in the cloud provider and it has by default reclaimPolicy: delete

Basavraj Nilkanthe:
reclaimPolicy: recycle is anyway deprecating or deprecated already

Simon Taylor:
@Basavraj Nilkanthe - thank you for your insight - appreciate it! :+1:

Tej_Singh_Rana:
Hope this blog help you,
https://community.kodekloud.com/t/reclaiming-a-pv-this-is-a-scenario-ive-run-into-and-which-wasnt-covered-in/15378

Simon Taylor:
@Tej_Singh_Rana - thanks Tej - I had arrived at the same solution seperately!

kubectl patch pv <your-pv-name> -p '{"spec":{"claimRef":null}}'