Azure Disk StorageClasses
What you'll learn: How to configure StorageClasses for Azure Managed Disks with different performance tiers.
The Azure Disk Storage Landscape
In Azure Kubernetes Service (AKS), just like with AWS EBS, you need StorageClasses to dynamically provision Azure Managed Disks. Azure offers three primary disk types, each with different performance characteristics and price points:
- Standard_LRS - Standard HDD, locally redundant, best for dev/test
- Premium_LRS - Premium SSD, locally redundant, production workloads
- UltraSSD_LRS - Ultra-high performance SSD for mission-critical workloads
Think of these like choosing a car: Standard is your reliable sedan for daily errands, Premium is a performance vehicle for serious driving, and UltraSSD is a race car for demanding applications.
Configuring Azure Disk StorageClasses
Here's a basic StorageClass for Premium SSD:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: azure-premium
provisioner: kubernetes.io/azure-disk
parameters:
storageaccounttype: Premium_LRS
kind: Managed
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
For Standard HDD:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: azure-standard
provisioner: kubernetes.io/azure-disk
parameters:
storageaccounttype: Standard_LRS
kind: Managed
The storageaccounttype parameter controls which disk tier you get. The kind: Managed parameter ensures Azure manages the underlying storage account for you—simplifying operations significantly.
Key Takeaway: Azure Disk StorageClasses let you choose between Standard_LRS, Premium_LRS, and UltraSSD_LRS tiers by setting the storageaccounttype parameter, giving you control over performance and cost for dynamically provisioned persistent volumes.