Permissions error when attaching Azure Disk to AKS pod Permissions error when attaching Azure Disk to AKS pod azure azure

Permissions error when attaching Azure Disk to AKS pod


From the docs here

When you create an Azure disk for use with AKS, you can create the disk resource in the node resource group. This approach allows the AKS cluster to access and manage the disk resource.If you instead create the disk in a separate resource group, you mustgrant the Azure Kubernetes Service (AKS) service principal for yourcluster the Contributor role to the disk's resource group.Alternatively, you can use the system assigned managed identity forpermissions instead of the service principal. For more information,see Use managed identities

From the docs here

You may need to access existing Disk resources in another resource group. Assign one of the following set of role permissions:

  1. Create a custom role and define the following role permissions:Microsoft.Compute/disks/readMicrosoft.Compute/disks/write
  2. Or, assign the Storage Account Contributor built-in role on the resource group