Skip to content

Commit c36ebc3

Browse files
Merge pull request #296606 from fhryo-msft/patch-52
Update use-container-storage-with-managed-disks.md
2 parents 42e66aa + 884143e commit c36ebc3

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

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

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -109,32 +109,31 @@ Follow these steps to prepare before creating a pre-provisioned storage pool for
109109

110110
1. Pre-provisioned Azure managed disks need to be in the same zone of the system node pool. Follow these steps to check zones of disks and system node pool.
111111

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-
```
112+
```bash
113+
$ systemNodepoolName=$(az aks nodepool list -g <resourceGroup> --cluster-name <clusterName> --query "[?mode=='System'].name" -o tsv)
114+
$ az aks nodepool show --resource-group <resourceGroup> --cluster-name <clusterName> --name $systemNodepoolName --query "availabilityZones" -o tsv
115+
1
116+
$ az disk show --resource-group <resourceGroup> --name <diskName> --query "zones" -o tsv
117+
1
118+
```
120119

121120
1. Find cluster managed identity:
122121

123-
```bash
124-
$ az aks show --resource-group <resourceGroup> --name <clusterName> --query "identity" -o tsv
125-
a972fa43-1234-5678-1234-c040eb546ec5
126-
```
122+
```bash
123+
$ az aks show --resource-group <resourceGroup> --name <clusterName> --query "identity" -o tsv
124+
a972fa43-1234-5678-1234-c040eb546ec5
125+
```
127126

128127
1. Grant **Contributor** role of the disk to the cluster managed identity. Sign in to the Azure portal and navigate to your disk. From the service menu, select **Access control (IAM)** > **Add role assignment**, and then select **Contributor** role and assign to the identity. If you created your disk under an AKS managed resource group (example: MC_myResourceGroup_myAKSCluster_eastus), you can skip this step.
129128

130129
1. Find the identity of the system node pool:
131130

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-
```
131+
```bash
132+
$ nodeResourceGroup=$(az aks show --resource-group <resourceGroup> --name <clusterName> --query nodeResourceGroup -o tsv)
133+
$ agentPoolIdentityName="<clusterName>-agentpool"
134+
$ az identity show --resource-group $nodeResourceGroup --output tsv --subscription $subscriptionId --name $agentPoolIdentityName --query 'principalId'
135+
eb25d20f-1234-4ed5-1234-cef16f5bfe93
136+
```
138137

139138
1. Grant **Disk Pool Operator** role on your disk to the identity. Sign in to the Azure portal and navigate to your disk. From the service menu, select **Access control (IAM)** > **Add role assignment**, and then select **Disk Pool Operator** role and assign to the identity.
140139

0 commit comments

Comments
 (0)