Parameter | Description | Limitation |
---|---|---|
spec.accessModes | The volumeaccess mode | ReadWriteMany, ReadWriteOnce, or ReadOnlyMany |
spec.storageClassName | The storage class to use to create the PV | Must be an existing storage class |
spec.capacity.storage | A desired capacity for the volume | The capacity quota is not enforced but is stored on the filesystem directory extended attributed for future use |
spec.csi.volumeHandle | A string specifying a previously created path | A string containing the volumeType (dir/v1) filesystem name, and the directory path. For example, dir/v1/podsFilesystem/my-dir Must be an existing filesystem and path |
Apply the PersistentVolume and check it has been created successfully:
1 the pv .yaml file 2 $ kubectl apply -f pv-wekafs-dir-static.yaml 3 persistentvolume/pv-wekafs-dir-static created 4 5 # check the pv resource has been created 6 $ kubectl get pv 7 NAME CAPACITY ACCESS MODES RE 8 pv-wekafs-dir-static 1Gi RWX Re
Now, bind a PVC to this specific PV, use the volumeName parameter under the PVC spec and provide it with the specific PV name.