Can all pv use the same subdirectory? #348
Answered
by
andyzhangx
huanghantao
asked this question in
Q&A
-
These are my YAML files: ---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: nfs-csi
provisioner: nfs.csi.k8s.io
parameters:
server: nfs-server.default.svc.cluster.local
share: /
reclaimPolicy: Delete
volumeBindingMode: Immediate
mountOptions:
- hard
- nfsvers=4.1
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: test-pv1
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 50Mi
storageClassName: nfs-csi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: test-pv2
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 50Mi
storageClassName: nfs-csi It creates two pv using different subdirectories as shown below: Is there a way to create pv using the same directory as shown below: Also, I wish the |
Beta Was this translation helpful? Give feedback.
Answered by
andyzhangx
Jun 10, 2022
Replies: 2 comments 13 replies
-
then I think you could use one PV/PVC pair, and the PVC could be used by multiple pods |
Beta Was this translation helpful? Give feedback.
13 replies
Answer selected by
andyzhangx
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
then I think you could use one PV/PVC pair, and the PVC could be used by multiple pods