Creating a PersistentVolumeClaim (PVC)
Create a PersistentVolumeClaim (PVC) YAML file for an NVMe‑oF backed persistent volume (PV).
About this task
A PVC is a request for abstract storage resources by a user. The PVC is associated with a Pod resource to provision a persistent volume (PV) that is backed by an NVMe‑oF gateway.
- Specify the accessModes value as
ReadWriteOnce. - Be sure to use the same StorageClass that was created in Creating a StorageClass when configuring the storageClassName.
Procedure
What to do next
For example,
host01$ kubectl get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE nvmeof-pvc Bound pvc-7a9e3d1e-3f24-4b9d-9f7b-02c6c1a3a0a1 10Gi RWO ceph-nvmeof-sc 2m
After the PVC is bound, bind the PVC to a Pod resource. For more information, see Binding a PersistentVolumeClaim to a Pod resource.