To provision persistent volumes with specific performance and redundancy characteristics, create a storage class that designates an Azure storage account type corresponding to your SKU tier.
Storage classes are used to differentiate and delineate storage levels and usages. By defining a storage class, you can obtain dynamically provisioned persistent volumes.
When creating a storage class, you can designate the storage account type. This corresponds to your Azure storage account SKU tier. Valid options are Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, and StandardSSD_ZRS. For information about finding your Azure SKU tier, see "SKU Types".
Both zone-redundant storage (ZRS) and PremiumV2_LRS have some region limitations. For information about these limitations, see "ZRS limitations" and "Premium_LRS limitations".
Procedure
-
Create a storage class designating the storage account type using a YAML file similar to the following:
$ oc create -f - << EOF
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: <storage-class>
provisioner: disk.csi.azure.com
parameters:
skuName: <storage-class-account-type>
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
EOF
-
metadata.name: Specifies the storage class name.
-
parameters.skuName: The storage account type. This corresponds to your Azure storage account SKU tier:`Standard_LRS`, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, PremiumV2_LRS.
|
|
For PremiumV2_LRS, specify cachingMode: None in storageclass.parameters.
|
-
Ensure that the storage class was created by listing the storage classes:
Example output
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
azurefile-csi file.csi.azure.com Delete Immediate true 68m
managed-csi (default) disk.csi.azure.com Delete WaitForFirstConsumer true 68m
sc-prem-zrs disk.csi.azure.com Delete WaitForFirstConsumer true 4m25s
In this example, sc-prem-zrs is the new storage class with storage account type.