英文:
NFS persistent volume is not deleted even with "Delete" persistentVolumeReclaimPolicy
问题
I am using NFS
Persistent Volume
to create PV.
The reclaim policy being used in persistentVolumeReclaimPolicy: Delete.
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv001
spec:
capacity:
storage: 3Gi
volumeMode: Filesystem
accessModes:
- ReadOnlyMany
persistentVolumeReclaimPolicy: Delete
mountOptions:
- hard
- nfsvers=4.1
nfs:
path: /
server: fs-0bb.efs.us-east-2.amazonaws.com
However, when I delete my deployment-controller
and also delete PersistentVolumeClaim
, the NFS volume is not getting deleted.
Expected Behaviour: The NFS PV volume should be deleted after PVC is deleted.
英文:
I am using NFS
Persistent Volume
to create PV.
The reclaim policy being used in persistentVolumeReclaimPolicy: Delete.
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv001
spec:
capacity:
storage: 3Gi
volumeMode: Filesystem
accessModes:
- ReadOnlyMany
persistentVolumeReclaimPolicy: Delete
mountOptions:
- hard
- nfsvers=4.1
nfs:
path: /
server: fs-0bb.efs.us-east-2.amazonaws.com
<br>
However, when I delete my deployment-controller
and also delete PersistentVolumeClaim
, the NFS volume is not getting deleted.
<br>
Expected Behaviour: The NFS PV volume should be deleted after PVC is deleted.
答案1
得分: 1
有两种PV配置类型,一种是静态PV,另一种是动态PV,如果您已配置静态PV,则需要删除PVC和PV。对于动态PV,只需删除PVC,然后PV将被释放。根据您提供的清单文件,似乎您正在使用静态PV,因此您需要删除PVC和PV。
英文:
<p dir="ltr" style="line-height: 1.38; text-align: justify; margin-top: 0pt; margin-bottom: 0pt; margin: 0;"><span style="font-size: 10pt; font-family: Roboto,sans-serif; color: #202124; background-color: #ffffff; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">There are two types of PV configurations one is Static PV and the other is dynamic PV, if you have configured Static PV you need to delete both PVC and PV. For dynamic PV you just need to delete the PVC and then the PV will be released. From the manifest file you have provided it seems that you are using static PV, so you need to delete both PVC and PV.</span></p>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论