Creating a StorageClass
Create a StorageClass YAML file to define the storage parameters, such as cluster information and Secret reference, for use with NVMe‑oF gateways for Ceph-CSI driver. StorageClass files are used for dynamic provisioning.
Before you begin
- Ceph Manager (
ceph-mgr) permissions. For more information, see User roles and permissions. - A Secret. When configuring the file, be sure to use the same Secret name and namespace as defined in Creating a Secret.
About this task
Create a StorageClass YAML file that defines how the Ceph-CSI driver communicates with the NVMe‑oF gateway for volume provisioning.
Procedure
What to do next
For example,
host01$ kubectl get sc NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE ceph-nvmeof-sc nvmeof.csi.ceph.com Delete Immediate true 2m
After the StorageClass is created and applied, create a PersistentVolumeClaim (PVC). For more information, see Creating a PersistentVolumeClaim (PVC).