You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/cluster-container-registry-integration.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,11 +26,13 @@ You can set up the AKS to ACR integration in a few steps using the Azure CLI, Az
26
26
27
27
## Create a new AKS cluster with ACR integration
28
28
29
-
You can set up AKS and ACR integration during the creation of your AKS cluster. To allow an AKS cluster to interact with ACR, an AAD **managed identity** is used.
29
+
You can set up AKS and ACR integration during the creation of your AKS cluster. To allow an AKS cluster to interact with ACR, an AAD managed identity is used.
30
+
31
+
### Create an ACR
30
32
31
33
If you don't already have an ACR, create one using the following command.
32
34
33
-
### [Azure CLI](#tab/azure-cli)
35
+
####[Azure CLI](#tab/azure-cli)
34
36
35
37
```azurecli
36
38
# Set this variable to the name of your ACR. The name must be globally unique.
@@ -40,7 +42,7 @@ MYACR=myContainerRegistry
40
42
az acr create -n $MYACR -g myContainerRegistryResourceGroup --sku basic
41
43
```
42
44
43
-
### [Azure PowerShell][#tab/azure-powershell]
45
+
####[Azure PowerShell][#tab/azure-powershell]
44
46
45
47
```azurepowershell
46
48
# Set this variable to the name of your ACR. The name must be globally unique.
### Create a new AKS cluster and integrate with an existing ACR
58
+
55
59
If you have already have an ACR, use the following command to create a new AKS cluster with ACR integration. This command allows you to authorize an existing ACR in your subscription and configures the appropriate **AcrPull** role for the managed identity. Supply valid values for your parameters below.
56
60
57
-
### [Azure CLI](#tab/azure-cli)
61
+
####[Azure CLI](#tab/azure-cli)
58
62
59
63
```azurecli
60
64
# Set this variable to the name of your ACR. The name must be globally unique.
@@ -77,7 +81,7 @@ Alternatively, you can specify the ACR name using an ACR resource ID using the f
77
81
> az aks create -n myAKSCluster -g myResourceGroup --generate-ssh-keys --attach-acr /subscriptions/<subscription-id>/resourceGroups/myContainerRegistryResourceGroup/providers/Microsoft.ContainerRegistry/registries/myContainerRegistry
78
82
> ```
79
83
80
-
### [Azure PowerShell](#tab/azure-powershell)
84
+
#### [Azure PowerShell](#tab/azure-powershell)
81
85
82
86
```azurepowershell
83
87
# Set this variable to the name of your ACR. The name must be globally unique.
@@ -97,7 +101,7 @@ This step may take several minutes to complete.
97
101
98
102
### Attach an ACR to an AKS cluster
99
103
100
-
### [Azure CLI](#tab/azure-cli)
104
+
####[Azure CLI](#tab/azure-cli)
101
105
102
106
Integrate an existing ACR with an existing AKS cluster using the [`--attach-acr` parameter][cli-param] and valid values for **acr-name** or **acr-resource-id**.
103
107
@@ -112,7 +116,7 @@ az aks update -n myAKSCluster -g myResourceGroup --attach-acr <acr-resource-id>
112
116
> [!NOTE]
113
117
> The `az aks update --attach-acr` command uses the permissions of the user running the command to create the ACR role assignment. This role is assigned to the [kubelet][kubelet] managed identity. For more information on AKS managed identities, see [Summary of managed identities][summary-msi].
114
118
115
-
### [Azure PowerShell](#tab/azure-powershell)
119
+
####[Azure PowerShell](#tab/azure-powershell)
116
120
117
121
Integrate an existing ACR with an existing AKS cluster using the [`-AcrNameToAttach` parameter][ps-attach] and valid values for **acr-name**.
Remove the integration between an ACR and an AKS cluster using the [`--detach-acr` parameter][cli-param] and valid values for **acr-name** or **acr-resource-id**.
133
137
@@ -139,7 +143,7 @@ az aks update -n myAKSCluster -g myResourceGroup --detach-acr <acr-name>
139
143
az aks update -n myAKSCluster -g myResourceGroup --detach-acr <acr-resource-id>
140
144
```
141
145
142
-
### [Azure PowerShell][#tab/azure-powershell]
146
+
####[Azure PowerShell][#tab/azure-powershell]
143
147
144
148
Remove the integration between an ACR and an AKS cluster using the [`-AcrNameToDetach` parameter][ps-detach] and valid values for **acr-name**.
0 commit comments