kubernetes - 如果pvc处于“已发布”状态,我们可以将其分配给pv吗?

标签 kubernetes persistent-volumes persistent-volume-claims

处于Persistent volume claim状态的持久卷后,我们可以将Released分配给它吗?
尝试过但不能

最佳答案

是。看看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.

  1. 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.
  2. Manually clean up the data on the associated storage asset accordingly.
  3. 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.


请让我知道是否有帮助。

关于kubernetes - 如果pvc处于“已发布”状态,我们可以将其分配给pv吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60606141/

相关文章:

php - 使用 PHP 创建和删除文件后 Docker 不释放内存

kubernetes - 将数据从一个 GKE PV 移动到另一个

mongodb - 我可以在 Kubernetes Statefulset 的 volumeClaimTemplate 中使用现有的 GCE 永久磁盘吗

kubernetes - 在 Kubernetes 集群中跨上下文移动资源/卷

kubernetes - Kubernetes 中的 StatefulSet 中的 3 个副本可以使用相同的 PersistentVolume 吗?

django - Kubernetes不返回端点Django Rest-Framework

Kubernetes1.9.0 kubeadm init - 在系统路径中找不到 crictl

azure - 如何将不同订阅的 ACR 附加到 AKS?

kubernetes - kubeadm/kubectl/kube-apiserver 打开功能门

Kubernetes:我可以将同一 PV 的不同子路径挂载到同一容器的不同位置吗?