Need to know how I can 'unclaim' a PVC once it's been attached to a PV

Hi - I’m working on the kubernetes challenges (specifically challenge #1) and it seems that once I get a pvc bound to a pvc even if I delete the pvc it stays claimed.

This meant I failed challenge 1 because I couldn’t get it to ‘unclaim’. If this happens on the CKAD exam - what are my options? How can I ‘undo’ the pvc’s claim on the pv?

Thank You

Hi,

You can try patching the PV to patch out the claim once the PVC is deleted.

kubectl patch pv nameof-pv -p '{"spec":{"claimRef": null}}' 
1 Like