Create k8s storage classes in order to define the storage system pool name, secret
reference, SpaceEfficiency, and fstype.
Procedure
Use the following procedure to create and apply the k8s storage classes:
-
Create a storage class yaml file,
storageclass-gold.yaml.
Update the capabilities, pools, and array secrets accordingly.
Note:
- IBM FlashSystem A9000 and A9000R always includes deduplication and compression.
- The Storwize applicable SpaceEfficiency values are: thin, compressed, or
deduplicated. These values are not case specific.
- The csi.storage.k8s.io/fstype parameter is optional. The values
allowed are ext4 or xfs. The default value is
ext4.
|
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: gold
provisioner: block.csi.ibm.com
parameters:
SpaceEfficiency: <VALUE>
pool: <VALUE_POOL_NAME>
csi.storage.k8s.io/provisioner-secret-name: <VALUE_ARRAY_SECRET>
csi.storage.k8s.io/provisioner-secret-namespace: <VALUE_ARRAY_SECRET_NAMESPACE>
csi.storage.k8s.io/controller-publish-secret-name: <VALUE_ARRAY_SECRET>
csi.storage.k8s.io/controller-publish-secret-namespace: <VALUE_ARRAY_SECRET_NAMESPACE>
csi.storage.k8s.io/fstype: <xfs>
-
Apply the storage class.
$> kubectl apply -f storageclass-gold.yaml
The storageclass.storage.k8s.io/gold created message is emitted.