2

By default, AKS has many storage classes like managed, managed-csi-premium, managed-premium, etc.

Example: managed-premium storage class:

$ k get sc managed-premium -o yaml
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  labels:
    addonmanager.kubernetes.io/mode: EnsureExists
    kubernetes.io/cluster-service: "true"
  name: managed-premium
parameters:
  cachingmode: ReadOnly
  kind: Managed
  storageaccounttype: Premium_LRS
provisioner: disk.csi.azure.com
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer

When I create a PV of this storage class, How do I Specify the performance tier (P10,20,30,40,50,etc)? If I need to create a new storage class, what parameters can I use to specify the performance tier?

Jerald Baker
  • 1,121
  • 1
  • 12
  • 48

4 Answers4

0

Seems, there is no option for that, see their code https://github.com/kubernetes-sigs/azuredisk-csi-driver/blob/master/docs/driver-parameters.md

You can try to play with DiskIOPSReadWrite.

But a better way is open a support ticket for Azure

pluk
  • 99
  • 4
0

Basically, the persistence volumes dynamically is using called as storage class in Aks have certain inbuilt storage classes here the persistence volume claim reference a storage class which is in inbuilt that inbuilt storage class will go head and create and appropriate matching persistent volume and always bind the PV, that it creates with persistent volume claim that requested it. Here you cannot bind two PVC to the same PV but you can use the same PVC in two different Pods

The inbuilt storage classes that we have a reclaimed policy of delete when pvc is deleted the PV as well as the underlying storage is also deleted, so that as you are creating own custom storage class here you have a custom premium retain which has a reclaim policy of retain but at the backend storage is still in premium ssd based managed disk i have given some knowledge on storage class

what parameters can I use to specify the performance tier?

Storage Classes have parameters that characterize the volumes that fall within that class of storage. According to the clause, Different parameters may be accepted depending on the provisioner and If you provide the parameter storageAccount you will need to manually create the storage account yourself with the name you set and use Azure storage account Sku tier. Default is empty.

skuName are available in Azure —

  • Standard_LRS — standard locally redundant storage (LRS)
  • Standard_GRS — standard geo-redundant storage (GRS)
  • Standard_ZRS — standard zone redundant storage (ZRS)
  • Standard_RAGRS — standard read-access geo-redundant storage (RA-GRS)
  • Premium_LRS — premium locally redundant storage (LRS)
  • Premium_ZRS — premium zone redundant storage (GRS)

For your Reference :

https://kubernetes.io/docs/concepts/storage/storage-classes/#azure-file

https://learn.microsoft.com/en-us/azure/aks/concepts-storage

Imran
  • 3,875
  • 2
  • 3
  • 12
0

The Tier is controlled by the Disk size i.e. 4Gi will give you P1, 8Gi will give you P2 and so on. See how Disk size map to Tier here https://learn.microsoft.com/en-us/azure/virtual-machines/disks-change-performance#what-tiers-can-be-changed

For example, the following will give you P2 with managed-csi-premium

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: my-premium-claim
spec:
  storageClassName: managed-csi-premium  # gives you Premium SSD (LRS)
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 8Gi  # gives you Disk tier P2

---
apiVersion: v1
kind: Pod
metadata:
  name: my-pv-pod
spec:
  volumes:
    - name: my-premium-storage
      persistentVolumeClaim:
        claimName: my-premium-claim
  containers:
    - name: my-premium-container
      image: mcr.microsoft.com/aks/fundamental/base-ubuntu:v0.0.11
      volumeMounts:
        - mountPath: "/data/share/"
          name: my-premium-storage
DarVar
  • 16,882
  • 29
  • 97
  • 146
0

You can't at this point, there is a preview version of AKS CSI that supports that in the future. Although the workaround is to overprovision a PV/PVC like if you choose size 4TB and you get the fastest tier P50

TheNano
  • 101
  • 2