Reputation: 85
Can we assign Persistent volume claim
to a Persistent Volume after it is in Released
state?
Tried it but can't
Upvotes: 1
Views: 4626
Reputation: 13878
Yes. Take a look at the official documentation:
Reclaiming
When a user is done with their volume, they can delete the PVC objects from the > API that allows reclamation of the resource. The reclaim policy for a PersistentVolume tells the cluster what to do with the volume after it has been
released
of its claim. Currently, volumes can either be Retained, Recycled, or Deleted.Retain
The Retain reclaim policy allows for manual reclamation of the resource. When the PersistentVolumeClaim is deleted, the PersistentVolume still exists and the volume is considered “released”. But it is not yet available for another claim because the previous claimant’s data remains on the volume. An administrator can manually reclaim the volume with the following steps.
- Delete the PersistentVolume. The associated storage asset in external infrastructure (such as an AWS EBS, GCE PD, Azure Disk, or Cinder volume) still exists after the PV is deleted.
- Manually clean up the data on the associated storage asset accordingly.
- Manually delete the associated storage asset, or if you want to reuse the same storage asset, create a new PersistentVolume with the storage asset definition.
Please let me know if that helped.
Upvotes: 4