Skip to content

Commit fdac691

Browse files
authored
Update use-managed-identity.md
1 parent 42f79af commit fdac691

File tree

1 file changed

+13
-29
lines changed

1 file changed

+13
-29
lines changed

articles/aks/use-managed-identity.md

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Use managed identities in Azure Kubernetes Service
33
description: Learn how to use managed identities in Azure Kubernetes Service (AKS)
44
ms.topic: article
5-
ms.date: 01/25/2022
5+
ms.date: 06/01/2022
66
---
77

88
# Use managed identities in Azure Kubernetes Service
@@ -130,16 +130,19 @@ az aks show -g <RGName> -n <ClusterName> --query "identity"
130130
```
131131

132132
> [!NOTE]
133-
> For creating and using your own VNet, static IP address, or attached Azure disk where the resources are outside of the worker node resource group, use the PrincipalID of the cluster System Assigned Managed Identity to perform a role assignment. For more information on role assignment, see [Delegate access to other Azure resources](kubernetes-service-principal.md#delegate-access-to-other-azure-resources).
133+
> For creating and using your own VNet, static IP address, or attached Azure disk where the resources are outside of the worker node resource group, CLI will perform the role assignement automatically. If you are using ARM template or other platforms, you need to use the PrincipalID of the cluster System Assigned Managed Identity to perform a role assignment. For more information on role assignment, see [Delegate access to other Azure resources](kubernetes-service-principal.md#delegate-access-to-other-azure-resources).
134134
>
135135
> Permission grants to cluster Managed Identity used by Azure Cloud provider may take up 60 minutes to populate.
136136
137137

138-
## Bring your own control plane MI
138+
## Bring your own (BYO) control plane MI
139139
A custom control plane identity enables access to be granted to the existing identity prior to cluster creation. This feature enables scenarios such as using a custom VNET or outboundType of UDR with a pre-created managed identity.
140140

141141
You must have the Azure CLI, version 2.15.1 or later installed.
142142

143+
> [!NOTE]
144+
> AKS will create a kubelet MI in the Node resource group if you do not BYO kubelet MI.
145+
143146
### Limitations
144147
* USDOD Central, USDOD East, USGov Iowa in Azure Government aren't currently supported.
145148

@@ -149,31 +152,6 @@ If you don't have a managed identity yet, you should go ahead and create one for
149152
az identity create --name myIdentity --resource-group myResourceGroup
150153
```
151154

152-
Assign "Managed Identity Operator" role to the identity.
153-
154-
```azurecli-interactive
155-
az role assignment create --assignee <id> --role "Managed Identity Operator" --scope <id>
156-
157-
158-
The result should look like:
159-
160-
```output
161-
{
162-
"canDelegate": null,
163-
"condition": null,
164-
"conditionVersion": null,
165-
"description": null,
166-
"id": "/subscriptions/<subscriptionid>/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity",
167-
"name": "myIdentity,
168-
"principalId": "<principalId>",
169-
"principalType": "ServicePrincipal",
170-
"resourceGroup": "myResourceGroup",
171-
"roleDefinitionId": "/subscriptions/<subscriptionid>/providers/Microsoft.Authorization/roleDefinitions/<definitionid>",
172-
"scope": "<resourceid>",
173-
"type": "Microsoft.Authorization/roleAssignments"
174-
}
175-
```
176-
177155
If your managed identity is part of your subscription, you can use [az identity CLI command][az-identity-list] to query it.
178156

179157
```azurecli-interactive
@@ -211,13 +189,18 @@ A successful cluster creation using your own managed identities contains this us
211189
},
212190
```
213191

214-
## Bring your own kubelet MI
192+
## Bring your own (BYO) kubelet MI
215193

216194
A Kubelet identity enables access to be granted to the existing identity prior to cluster creation. This feature enables scenarios such as connection to ACR with a pre-created managed identity.
217195

218196
> [!WARNING]
219197
> Updating kubelet MI will upgrade Nodepool, which causes downtime for your AKS cluster as the nodes in the nodepools will be cordoned/drained and then reimaged.
220198
199+
200+
> [!NOTE]
201+
> For BYO kubelet MI, only CLI integrates role assignment for control plane MI. If you are using ARM template or other platforms, you need to excute `az role assignment create --assignee <id> --role "Managed Identity Operator" --scope <id>` to assign "Managed Identity Operator" role to the identity
202+
203+
221204
### Prerequisites
222205

223206
- You must have the Azure CLI, version 2.26.0 or later installed.
@@ -252,6 +235,7 @@ The result should look like:
252235
}
253236
```
254237

238+
255239
If you don't have a kubelet managed identity yet, you should go ahead and create one. The following example uses the [az identity create][az-identity-create] command:
256240

257241
```azurecli-interactive

0 commit comments

Comments
 (0)