我们可以将 pvc 分配给处于 Released 状态的 pv 吗?
Can we assign pvc to a pv if it is in Released state?
我们可以将 Persistent volume claim
分配给处于 Released
状态的 Persistent Volume 吗?
试过了但是不行
是的。看看 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.
如果有帮助,请告诉我。
我们可以将 Persistent volume claim
分配给处于 Released
状态的 Persistent Volume 吗?
试过了但是不行
是的。看看 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.
如果有帮助,请告诉我。