|
| 1 | +// |
| 2 | +// Module included in the following assemblies: |
| 3 | +// |
| 4 | +// * storage/container_storage_interface/persistent-storage-csi-azure.adoc |
| 5 | +// |
| 6 | + |
| 7 | +:_content-type: PROCEDURE |
| 8 | +[id="persistent-storage-csi-azure-disk-sc-zrs_{context}"] |
| 9 | += Creating a storage class with storage account type |
| 10 | + |
| 11 | + |
| 12 | +Storage classes are used to differentiate and delineate storage levels and usages. By defining a storage class, you can obtain dynamically provisioned persistent volumes. |
| 13 | + |
| 14 | +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`, `StandardSSD_ZRS`, and `PremiumV2_LRS`. For information about finding your Azure SKU tier, see link:https://learn.microsoft.com/en-us/rest/api/storagerp/srp_sku_types[SKU Types]. |
| 15 | + |
| 16 | +.Prerequisites |
| 17 | + |
| 18 | +* Access to an {product-title} cluster with administrator rights |
| 19 | +
|
| 20 | +.Procedure |
| 21 | + |
| 22 | +Use the following steps to create a storage class with a storage account type. |
| 23 | + |
| 24 | +. Create a storage class designating the storage account type using a YAML file similar to the following: |
| 25 | ++ |
| 26 | +[source, terminal] |
| 27 | +-- |
| 28 | +$ oc create -f - << EOF |
| 29 | +apiVersion: storage.k8s.io/v1 |
| 30 | +kind: StorageClass |
| 31 | +metadata: |
| 32 | + name: <storage-class> <1> |
| 33 | +provisioner: disk.csi.azure.com |
| 34 | +parameters: |
| 35 | + skuName: <storage-class-account-type> <2> |
| 36 | +reclaimPolicy: Delete |
| 37 | +volumeBindingMode: WaitForFirstConsumer |
| 38 | +allowVolumeExpansion: true |
| 39 | +EOF |
| 40 | +-- |
| 41 | +<1> Storage class name. |
| 42 | +<2> 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`. |
| 43 | + |
| 44 | +. Ensure that the storage class was created by listing the storage classes: |
| 45 | ++ |
| 46 | +[source,terminal] |
| 47 | +-- |
| 48 | +$ oc get storageclass |
| 49 | +-- |
| 50 | ++ |
| 51 | +[source,terminal] |
| 52 | +.Example output |
| 53 | +-- |
| 54 | +$ oc get storageclass |
| 55 | +NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE |
| 56 | +azurefile-csi file.csi.azure.com Delete Immediate true 68m |
| 57 | +managed-csi (default) disk.csi.azure.com Delete WaitForFirstConsumer true 68m |
| 58 | +sc-prem-zrs disk.csi.azure.com Delete WaitForFirstConsumer true 4m25s <1> |
| 59 | +-- |
| 60 | +<1> New storage class with storage account type. |
0 commit comments