How to define the name of the PV on the NFS directory after dynamically creating PV using PVC #548
Unanswered
caijinhu123
asked this question in
Q&A
Replies: 1 comment 2 replies
-
When defining the storage class, add the 'subDir' parameter, just like the example below
After modifying the storage class, redeployment is required, so that the directory name in NFS will change after creating the PVC. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
pvc.yaml
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: pvc-nfs-dynamic spec: accessModes: - ReadWriteMany resources: requests: storage: 10Gi storageClassName: nfs-csi
After creating PVC using the above YAML, the name of the PV on the NFS directory is
pvc-5a900a0e-506b-470f-b1de-03a021fb44b6
How to set up the display of the directory name on NFS after creating PVC
default-pvc-nfs-dynamic-470f-b1de-03a021fb44b6 (PVC.namespace-.PVC.name)
Beta Was this translation helpful? Give feedback.
All reactions