Closed solune closed 1 year ago
Hello, Dynamic provisioning is really interesting because I don't need to précrate volume on storage before. But when helm update it create a new volume.
I try to use selector in pvc:
selector: matchLabels: for_app: my-app
but csi say "failed to provision volume with StorageClass "dorado-nfs": claim Selector is not supported"
So How can i reuse dynamic provisioned volume in my app ?
Please provide the sc file and pvc file used, the error information is also described in detail, so that we can better help you.
Hello, My storage-class:
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: "dorado-nfs"
provisioner: csi.huawei.com
allowVolumeExpansion: true
reclaimPolicy: Retain
parameters:
backend: "doradorc9-nfs"
pool: "StoragePool001"
volumeType: fs
hyperMetro: "true"
allocType: thin
authClient: "10.35.0.0/16"
mountOptions:
- nfsvers=4.1
and my pvc:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: dsiadmin-file-uploader-huawei-pvc
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
storageClassName: dorado-nfs
resources:
requests:
storage: 100Gi
selector:
matchLabels:
for_app: fileuploader
selector
Dynamically provisioning does not support the use of "selector" because it is meaningless. "Selector" are useful only in statically provisioning scenarios.
So how can I ré-use dynamically provided volume ?
So how can I ré-use dynamically provided volume ?
One SC can be used to create multiple PVCs. Each PVC is bound to a PV(one-to-one mapping). One PVC can be used by multiple pods. For details, PVC:https://kubernetes.io/docs/concepts/storage/persistent-volumes/ Pod:https://kubernetes.io/docs/concepts/workloads/pods/
Hello, Dynamic provisioning is really interesting because I don't need to précrate volume on storage before. But when helm update it create a new volume.
I try to use selector in pvc:
but csi say "failed to provision volume with StorageClass "dorado-nfs": claim Selector is not supported"
So How can i reuse dynamic provisioned volume in my app ?