Add container storage to Kubernetes in Azure Stack Hub

As part of the Kubernetes community effort (Kubernetes in-tree to CSI volume migration) to move in-tree volume providers to Container Storage Interface CSI, you can find the following CSI driver in Azure Stack: Azure Disk.

Details Azure Disk CSI Driver
Project Repository azuredisk-csi-driver
CSI Driver Version v1.0.0+
Access Mode ReadWriteOnce
Windows Agent Node Support
Dynamic Provisioning Support
Considerations Azure Disk CSI Driver Limitations
Slack Support Channel #provider-azure

In AKSe versions v0.75.3 and above, Azure Disk CSI driver works for both Linux and Windows nodes, through azuredisk-csi-driver addon or helm charts. In disconnected environments, only azuredisk-csi-driver addon is supported.


  • Azure Stack build 2011 and later.
  • AKS engine version v0.60.1 and later.
  • Kubernetes version 1.18 and later.
  • Since the Controller server of CSI Drivers requires two replicas, a single node master pool isn't recommended.
  • Helm 3

Install and uninstall CSI drivers

In this section, follow the example commands to deploy a stateful set application consuming CSI Driver.

Azure disk CSI driver

Install CSI driver

helm repo add azuredisk-csi-driver
helm install azuredisk-csi-driver azuredisk-csi-driver/azuredisk-csi-driver \
  --namespace kube-system \
  --set cloud=AzureStackCloud \
  --set controller.runOnMaster=true \
  --version ${DRIVER_VERSION}

Deploy storage class

kubectl apply -f

Deploy example stateful set application

kubectl apply -f

Validate volumes and applications

You should see a sequence of timestamps are persisted in the volume.

kubectl exec statefulset-azuredisk-0 -- tail /mnt/azuredisk/outfile

Delete example stateful set application

kubectl delete -f

Delete storage class

Before you delete the Storage Class, make sure Pods that consume the Storage Class have been terminated.

kubectl delete -f

Uninstall CSI driver

helm uninstall azuredisk-csi-driver --namespace kube-system
helm repo remove azuredisk-csi-driver

Azure Disk CSI Driver limitations on Azure Stack Hub

  • Azure Disk IOPS is capped at 2300. For details, see VM sizes supported in Azure Stack Hub.
  • Azure Stack Hub doesn't support shared disks, so a maxShares value greater than 1 isn't valid in a StorageClass.
  • Azure Stack Hub only supports standard locally redundant (Standard_LRS) and Premium Locally redundant (Premium_LRS) Storage Account types, so only Standard_LRS and Premium_LRS are valid for the skuName parameter in a StorageClass.
  • Azure Stack Hub doesn't support incremental disk snapshot, so only false is valid for parameter incremental in a VolumeSnapshotClass.
  • For Windows agent nodes, you need to install Windows CSI Proxy. For details, see Windows CSI Proxy. To enable the proxy via AKS engine API model, see CSI Proxy for Windows.

Next steps