Skip to content

Commit fa7c880

Browse files
authored
Update use-container-storage-with-managed-disks.md
1 parent 3cf9743 commit fa7c880

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

articles/storage/container-storage/use-container-storage-with-managed-disks.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,39 @@ When the storage pool is created, Azure Container Storage will create a storage
105105

106106
If you have Azure managed disks that are already provisioned, you can create a pre-provisioned storage pool using those disks. Because the disks are already provisioned, you don't need to specify the skuName or storage capacity when creating the storage pool.
107107

108+
Follow these steps to prepare before creating pre-provisioned storage pool for Azure Disks.
109+
110+
1. Pre-provisioned Azure managed disks need to be in the same zone of system node pool. Follow these steps to check zones of disks and system node pool.
111+
112+
```bash
113+
114+
$ systemNodepoolName=$(az aks nodepool list -g <resourceGroup> --cluster-name <clusterName> --query "[?mode=='System'].name" -o tsv)
115+
$ az aks nodepool show --resource-group <resourceGroup> --cluster-name <clusterName> --name $systemNodepoolName --query "availabilityZones" -o tsv
116+
1
117+
$ az disk show --resource-group <resourceGroup> --name <diskName> --query "zones" -o tsv
118+
1
119+
```
120+
121+
1. Find cluster managed identity
122+
123+
```bash
124+
$ az aks show --resource-group <resourceGroup> --name <clusterName> --query "identity" -o tsv
125+
a972fa43-1234-5678-1234-c040eb546ec5
126+
```
127+
128+
1. Grant “Contributor” role of the disk to the cluster managed identity. Go to: Portal > Your disk > Access control (IAM) > Add role assignment > Select “Contributor” role and assign to the identity. It’s not required when your disk is created under AKS managed resource group (Example: MC_myResourceGroup_myAKSCluster_eastus).
129+
130+
1. Find identity of the system node pool
131+
132+
```bash
133+
$ nodeResourceGroup=$(az aks show --resource-group <resourceGroup> --name <clusterName> --query nodeResourceGroup -o tsv)
134+
$ agentPoolIdentityName="<clusterName>-agentpool"
135+
$ az identity show --resource-group $nodeResourceGroup --output tsv --subscription $subscriptionId --name $agentPoolIdentityName --query 'principalId'
136+
eb25d20f-1234-4ed5-1234-cef16f5bfe93
137+
```
138+
139+
1. Grant “Disk Pool Operator” role on your disk, to the identity. Go to: Portal > Your Disk > Access control (IAM) > Add role assignment > Select “Disk Pool Operator” role and assign to the identity.
140+
108141
Follow these steps to create a pre-provisioned storage pool for Azure Disks.
109142

110143
1. Sign in to the Azure portal.

0 commit comments

Comments
 (0)