Creating a storage class

Create a storage class.

Required user type or access level: Cluster administrator

When you create a storage class, consider these storage classes and their associated quality of service (QoS).

Table 1. Storage Classes
Storage class name QoS ((Input/output operations per second (IOPS)/size)
ibmc-file-bronze 2 IOPS
ibmc-file-silver 4 IOPS
ibmc-file-gold 10 IOPS
ibmc-file-custom Variable size/and IOP
ibmc-block-bronze 2 IOPS
ibmc-block-silver 4 IOPS
ibmc-block-gold 10 IOPS
ibmc-block-custom Variable size/and IOP

Creating storage classes during IBM Cloud Private installation

You can create a storage class during the installation of IBM Cloud Private. After the installation is complete, the storage class is created and can be used for dynamic storage provisioning.

Note: Only Kubernetes storage classes are supported.

Complete these steps to provide a storage class definition file:

  1. Create a YAML file with the storage class definitions. For information about storage class definitions, refer to the Kubernetes documentation.
  2. Save the YAML file in the /<installation_directory>/cluster/misc/storage_class folder.

Note: Do not place any other files in the /misc/storage_class location. The IBM Cloud Private installer picks only the storage class YAML files from the directory and ignores any other file.

Storage class examples

For instructions to create GlusterFS and vSphere storage classes in IBM® Cloud Private, see Creating a storage class for GlusterFS and Creating a storage class for vSphere volume.

For a list of several storage class definitions, see Storage Classes Opens in a new tab.

Basic storage class

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name:  
provisioner: kubernetes.io/<plug-in-type>
parameters:
  parameter 1: value
  ...
  parameter N: value

Where:

GlusterFS

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: slow
provisioner: kubernetes.io/glusterfs
parameters:
  resturl: "http://127.0.0.1:8081"
  clusterid: "630372ccdc720a92c681fb928f27b53f"
  restauthenabled: "true"
  restuser: "admin"
  secretNamespace: "default"
  secretName: "heketi-secret"
  gidMin: "40000"
  gidMax: "50000"
  volumetype: "replicate:3"

Where:

vSphere

Table 1. VSAN storage capability
Storage capability name Description
cacheReservation Flash read cache reservation
diskStripes Number of disk stripes per object
forceProvisioning Force provisioning
hostFailuresToTolerate Number of failures to tolerate
iopsLimit IOPS limit for object
objectSpaceReservation Object space reservation

While the vSphere infrastructure administrator creates a storage class inside Kubernetes, he or she can specify storage requirements for applications in terms of storage capabilities. When the administrator creates a StorageClass, he or she must specify the storage capability names that are used in table 1 because those names might differ from the ones that VSAN uses. For example, Number of disk stripes per object is referred to as stripeWidth in VSAN documentation. However, vSphere Cloud Provider uses the name diskStripes.