Skip to content

Commit 4520a2d

Browse files
Merge pull request #230425 from MGoedtel/task69859
Edited Container Registry Integration article
2 parents c7ff010 + f3dd158 commit 4520a2d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

articles/aks/cluster-container-registry-integration.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
title: Integrate Azure Container Registry with Azure Kubernetes Service
33
description: Learn how to integrate Azure Kubernetes Service (AKS) with Azure Container Registry (ACR)
44
ms.topic: article
5-
ms.date: 11/16/2022
5+
ms.date: 03/13/2023
66
ms.tool: azure-cli, azure-powershell
77
ms.devlang: azurecli
88
ms.custom: devx-track-azurepowershell, devx-track-azurecli
99
---
1010

1111
# Authenticate with Azure Container Registry from Azure Kubernetes Service
1212

13-
You need to establish an authentication mechanism when using [Azure Container Registry (ACR)][acr-intro] with Azure Kubernetes Service (AKS). This operation is implemented as part of the Azure CLI, Azure PowerShell, and Azure portal experiences by granting the required permissions to your ACR. This article provides examples for configuring authentication between these Azure services.
13+
When using [Azure Container Registry (ACR)][acr-intro] with Azure Kubernetes Service (AKS), you need to establish an authentication mechanism. Configuring the required permissions between ACR and AKS can be accomplished using the Azure CLI, Azure PowerShell, and Azure portal. This article provides examples to configure authentication between these Azure services using the Azure CLI or Azure PowerShell.
1414

15-
You can set up the AKS to ACR integration using the Azure CLI or Azure PowerShell. The AKS to ACR integration assigns the [**AcrPull** role][acr-pull] to the [Azure Active Directory (Azure AD) **managed identity**][aad-identity] associated with the agent pool in your AKS cluster. For more information on AKS managed identities, see [Summary of managed identities][summary-msi].
15+
The AKS to ACR integration assigns the [**AcrPull** role][acr-pull] to the [Azure Active Directory (Azure AD) **managed identity**][aad-identity] associated with the agent pool in your AKS cluster. For more information on AKS managed identities, see [Summary of managed identities][summary-msi].
1616

1717
> [!IMPORTANT]
18-
> There is a latency issue with Azure Active Directory groups when attaching ACR. If the AcrPull role is granted to an Azure AD group and the kubelet identity is added to the group to complete the RBAC configuration, there may be a delay before the RBAC group takes effect. If you are running automation that requires the RBAC configuration to be complete, we recommended you use the [Bring your own kubelet identity][byo-kubelet-identity] as a workaround. You can pre-create a user-assigned identity, add it to the Azure AD group, then use the identity as the kubelet identity to create an AKS cluster. This ensures the identity is added to the Azure AD group before a token is generated by kubelet, which avoids the latency issue.
18+
> There is a latency issue with Azure Active Directory groups when attaching ACR. If the **AcrPull** role is granted to an Azure AD group and the kubelet identity is added to the group to complete the RBAC configuration, there may be a delay before the RBAC group takes effect. If you are running automation that requires the RBAC configuration to be complete, we recommended you use the [Bring your own kubelet identity][byo-kubelet-identity] as a workaround. You can pre-create a user-assigned identity, add it to the Azure AD group, then use the identity as the kubelet identity to create an AKS cluster. This ensures the identity is added to the Azure AD group before a token is generated by kubelet, which avoids the latency issue.
1919
2020
> [!NOTE]
2121
> This article covers automatic authentication between AKS and ACR. If you need to pull an image from a private external registry, use an [image pull secret][image-pull-secret].
@@ -26,6 +26,7 @@ You can set up the AKS to ACR integration using the Azure CLI or Azure PowerShel
2626
* To avoid needing one of these roles, you can instead use an existing managed identity to authenticate ACR from AKS. For more information, see [Use an Azure managed identity to authenticate to an ACR](../container-registry/container-registry-authentication-managed-identity.md).
2727
* If you're using Azure CLI, this article requires that you're running Azure CLI version 2.7.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][azure-cli-install].
2828
* If you're using Azure PowerShell, this article requires that you're running Azure PowerShell version 5.9.0 or later. Run `Get-InstalledModule -Name Az` to find the version. If you need to install or upgrade, see [Install Azure PowerShell][azure-powershell-install].
29+
* Examples and syntax to use Terraform for configuring ACR can be found in the [Terraform reference][terraform-reference].
2930

3031
## Create a new AKS cluster with ACR integration
3132

@@ -84,6 +85,8 @@ Alternatively, you can specify the ACR name using an ACR resource ID using the f
8485
> az aks create -n myAKSCluster -g myResourceGroup --generate-ssh-keys --attach-acr /subscriptions/<subscription-id>/resourceGroups/myContainerRegistryResourceGroup/providers/Microsoft.ContainerRegistry/registries/myContainerRegistry
8586
> ```
8687
88+
This command may take several minutes to complete.
89+
8790
#### [Azure PowerShell](#tab/azure-powershell)
8891
8992
```azurepowershell
@@ -96,9 +99,9 @@ $MYACR = 'myContainerRegistry'
9699
New-AzAksCluster -Name myAKSCluster -ResourceGroupName myResourceGroup -GenerateSshKey -AcrNameToAttach $MYACR
97100
```
98101
99-
---
102+
This command may take several minutes to complete.
100103

101-
This step may take several minutes to complete.
104+
---
102105

103106
## Configure ACR integration for existing AKS clusters
104107

@@ -263,3 +266,4 @@ nginx0-deployment-669dfc4d4b-xdpd6 1/1 Running 0 20s
263266
[cli-param]: /cli/azure/aks#az-aks-update-optional-parameters
264267
[ps-attach]: /powershell/module/az.aks/set-azakscluster#-acrnametoattach
265268
[byo-kubelet-identity]: use-managed-identity.md#use-a-pre-created-kubelet-managed-identity
269+
[terraform-reference]: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/container_registry

0 commit comments

Comments
 (0)