Driver Parameters

September 29, 2023 ยท View on GitHub

required permissions for CSI driver controller
"Microsoft.Resources/subscriptions/resourceGroups/read",
"Microsoft.Compute/disks/*",
"Microsoft.Compute/snapshots/*",
"Microsoft.Compute/virtualMachines/write",
"Microsoft.Compute/virtualMachines/*/read",
"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/write",
"Microsoft.Compute/virtualMachineScaleSets/*/read",
"Microsoft.Compute/virtualMachineScaleSets/read"

Dynamic Provisioning

V1 Parameters

get an example

NameMeaningAvailable ValueMandatoryDefault value
skuNameazure disk storage account type (alias: storageAccountType)Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, PremiumV2_LRS
(Note: PremiumV2_LRS only supports None caching mode)
NoStandardSSD_LRS
kindmanaged or unmanaged(blob based) diskmanaged (dedicated, shared are deprecated)Nomanaged
fsTypeFile System Typeext4, ext3, ext2, xfs, btrfs on Linux, ntfs on WindowsNoext4 on Linux, ntfs on Windows
cachingModeAzure Data Disk Host Cache SettingNone, ReadOnly, ReadWrite
(ReadWrite caching mode is deprecated, PremiumV2_LRS only supports None caching mode)
NoReadOnly
locationspecify Azure region in which Azure disk will be created, region name should only have lower-case letter or digit number.eastus2, westus, etc.Noif empty, driver will use the same region name as current k8s cluster
resourceGroupspecify the resource group in which azure disk will be createdexisting resource group nameNoif empty, driver will use the same resource group name as current k8s cluster
DiskIOPSReadWriteUltraSSD, PremiumV2_LRS disk IOPS capabilityNo500 for UltraSSD
DiskMBpsReadWriteUltraSSD, PremiumV2_LRS disk throughput capabilityNo100 for UltraSSD
LogicalSectorSizeLogical sector size in bytes for Ultra disk. Supported values are 512 ad 4096. 4096 is the default.512, 4096No4096
tagsazure disk tagstag format: key1=val1,key2=val2No""
diskEncryptionSetIDResourceId of the disk encryption set to use for enabling encryption at restformat: /subscriptions/{subs-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSet-name}No""
diskEncryptionTypeencryption type of the disk encryption setEncryptionAtRestWithCustomerKey(by default), EncryptionAtRestWithPlatformAndCustomerKeysNo""
writeAcceleratorEnabledWrite Accelerator on Azure Diskstrue, falseNo""
perfProfileBlock device performance tuning using perfProfilesnone, basic, advancedNonone
networkAccessPolicyNetworkAccessPolicy property to prevent anybody from generating the SAS URI for a disk or a snapshotAllowAll, DenyAll, AllowPrivateNoAllowAll
publicNetworkAccessEnabling or disabling public access to the underlying data of a disk on the internet, even when the NetworkAccessPolicy is set to AllowAllEnabled, DisabledNoEnabled
diskAccessIDARM id of the DiskAccess resource for using private endpoints on disksNo``
enableBurstingenable on-demand bursting beyond the provisioned performance target of the disk. On-demand bursting only be applied to Premium disk, disk size > 512GB, Ultra & shared disk is not supported. Bursting is disabled by default.true, falseNofalse
enablePerformancePlusenabling performance plus, this setting only applies to Premium SSD, Standard SSD and HDD with disk size > 512GB.true, falseNofalse
attachDiskInitialDelaysetting a large number for the initial delay in milliseconds for batch disk attach/detach could reduce the number of operations and ARM throttlingNo1000
useragentUser agent used for customer usage attributionNoGenerated Useragent formatted driverName/driverVersion compiler/version (OS-ARCH)
subscriptionIDspecify Azure subscription ID in which Azure disk will be createdAzure subscription IDNoif not empty, resourceGroup must be provided
  • disk created by dynamic provisioning
    • disk name format (example): pvc-e132d37f-9e8f-434a-b599-15a4ab211b39

    • tags format (example):

      k8s-azure-created-by: kubernetes-azure-dd
      kubernetes.io-created-for-pv-name: pvc-e132d37f-9e8f-434a-b599-15a4ab211b39
      kubernetes.io-created-for-pvc-name: pvc-azuredisk
      kubernetes.io-created-for-pvc-namespace: default
      

New or Updated Parameters for V2

In addition to the parameters supported by the V1 driver, Azure Disk CSI driver V2 adds or modifies the following parameters:

NameMeaningAvailable ValueMandatoryDefault value
enableAsyncAttachThe V2 driver uses a different strategy to manage Azure API throttling and ignores this parameter.N/ANoN/A
maxSharesThe total number of shared disk mounts allowed for the disk. Setting the value to 2 or more enables attachment replicas.Supported values depend on the disk size. See Share an Azure managed disk for supported values.No1
maxMountReplicaCountThe number of replicas attachments to maintain.This value must be in the range [0..(maxShares - 1)]NoIf accessMode is ReadWriteMany, the default is 0. Otherwise, the default is maxShares - 1

NOTE: Setting the maxShares parameter to a value greater than 1 enables faster pod failover through attachment replicas. See the Azure CSI Driver V2 document for more details. See the failover demo for an example of how to use attachment replicas and ZRS disks for a better pod failover experience.

Static Provisioning (bring your own Azure Disk)

get an example

NameMeaningAvailable ValueMandatoryDefault value
volumeHandleAzure disk URI/subscriptions/{sub-id}/resourcegroups/{group-name}/providers/microsoft.compute/disks/{disk-id}YesN/A
volumeAttributes.fsTypeFile System Typeext4, ext3, ext2, xfs, btrfs on Linux, ntfs on WindowsNoext4 on Linux, ntfs on Windows
volumeAttributes.partitionpartition num of the existing disk (only supported on Linux)1, 2, 3Noempty(no partition)
- make sure partition format is like -part1
volumeAttributes.cachingModedisk host cache settingNone, ReadOnly, ReadWriteNoReadOnly
volumeAttributes.attachDiskInitialDelaysetting a large number for the initial delay in milliseconds for batch disk attach/detach could reduce the number of operations and ARM throttlingNo1000

VolumeSnapshotClass

NameMeaningAvailable ValueMandatoryDefault value
resourceGroupresource group for storing snapshot shotsEXISTING RESOURCE GROUPNoIf not specified, snapshot will be stored in the same resource group as source Azure disk
incrementaltake full or incremental snapshottrue, falseNotrue
dataAccessAuthModeenable data access authentication mode when creating a snapshotNone, AzureActiveDirectoryNoNone
tagsazure disk tagstag format: 'key1=val1,key2=val2'No""
userAgentUser agent used for customer usage attributionNoGenerated Useragent formatted driverName/driverVersion compiler/version (OS-ARCH)
subscriptionIDspecify Azure subscription ID in which Azure disk will be createdAzure subscription IDNoif not empty, resourceGroup must be provided, incremental must set as false
locationspecify Azure region in which Azure disk snapshot will be created, region name should only have lower-case letter or digit number.eastus2, westus, etc.Noif empty, driver will use the same region name as current k8s cluster