When CSI driver is enabled, built-in in-tree driver(kubernetes.io/azure-disk
) should not be used any more since there is potential race condition when both in-tree and CSI drivers are working.
From AKS 1.21, Azure Disk and Azure File CSI drivers would be installed by default.
Follow AKS doc: Enable CSI drivers for Azure disks and Azure Files on AKS (preview)
Please remove manual installed open source CSI driver before upgrading to AKS 1.21 next time.
- Prerequisites
AKS cluster is created with user assigned identity(with naming rule AKS Cluster Name-agentpool
) on agent node pool by default, make sure that identity has Contributor
role on node resource group, follow below instruction to set up Contributor
role on node resource group
:
- Install CSI driver
install latest released CSI driver version, following guide here
- Set up new storage classes
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/deploy/example/storageclass-azuredisk-csi.yaml
follow guide here to replace built-in storage classes on AKS
- Remove CSI driver before upgrading to AKS 1.21+
Please remove manual installed open source CSI driver before upgrading to AKS 1.21+, follow the Clean up CSI driver
section in CSI driver install guide.