Skip to content

Commit 9729e76

Browse files
authored
Update container-storage-aks-quickstart.md
Azure CLI commands added to assign Contributor right to AKS Managed Identity.
1 parent 01c9d4e commit 9729e76

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

articles/storage/container-storage/container-storage-aks-quickstart.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,15 @@ Azure Container Service is a separate service from AKS, so you'll need to grant
157157
1. Under **Select**, search for and select the managed identity with your cluster name and `-agentpool` appended.
158158
1. Select **Review + assign**.
159159

160+
Run the following command to assign Contributor role to AKS managed identity.. Remember to replace `<resource-group>` and `<cluster-name>` with your own values
161+
162+
```azurecli-interactive
163+
export AKS_MI_OBJECT_ID=$(az aks show --name <cluster-name> --resource-group <resource-group> --query "identityProfile.kubeletidentity.objectId" -o tsv)
164+
export AKS_NODE_RG=$(az aks show --name <cluster-name> --resource-group <resource-group> --query "nodeResourceGroup" -o tsv)
165+
166+
az role assignment create --assignee $AKS_MI_OBJECT_ID --role "Contributor" --resource-group "$AKS_NODE_RG"
167+
```
168+
160169
## Install Azure Container Storage
161170

162171
The initial install uses Azure Arc CLI commands to download a new extension. Replace `<cluster-name>` and `<resource-group>` with your own values. The `<name>` value can be whatever you want; it's just a label for the extension you're installing.

0 commit comments

Comments
 (0)