Creating a StorageClass
Create a StorageClass YAML file in order to define the storage parameters, such as file system name, Secret reference, SpaceEfficiency, and fstype for use with Ceph File Systems (CephFS) 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 array Secret and array Secret namespace as defined in Creating a Secret.
About this task
Create a storage class YAML file in one of the following ways:
- Mounting with FUSE
- Mounting with kernel
Procedure
What to do next
For example,
host01$ kubectl get sc NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE cephfs-storageclass-fuse cephfs.csi.ceph.com Delete Immediate true 7d1h cephfs-storageclass-ibm cephfs.csi.ceph.com Delete Immediate true 7d
After the StorageClass is created and applied, create the StorageClass. For more information, see Creating a PersistentVolumeClaim (PVC).