Question

Difficulty: EasyDeploy and Configure Azure Container Apps

You are deploying an Azure Container App named shipping-service that pulls its container image from a private Azure Container Registry (ACR). You enable a system-assigned managed identity on the Container App, but the deployment fails with an error indicating that the image cannot be pulled. Which action should you perform to resolve this deployment failure?

  1. Assign the AcrPull role to the Container App's system-assigned managed identity at the scope of the Azure Container Registry.Answer
  2. B
    Configure the Container App to pull the image using a user-assigned managed identity reference, while leaving only the system-assigned identity enabled.
  3. C
    Run the az acr login command from your local development machine to authenticate the Azure Container Apps environment to the registry.
  4. D
    Create a Shared Access Signature (SAS) token for the Azure Container Registry and configure the Container App's registry settings to use the token.

Answer

Assign the AcrPull role to the Container App's system-assigned managed identity at the scope of the Azure Container Registry.
To allow an Azure Container App to securely pull images from a private Azure Container Registry, the Container App's managed identity must be granted the AcrPull role at the registry's scope. This allows the host environment to retrieve the image using Azure AD authentication.

Step-by-Step Solution

1
Determine the identity type configured on the Container App.
The Container App uses a system-assigned managed identity.
This identifies the security principal that needs permissions to pull images.
2
Grant the required permissions on the target Azure Container Registry.
The system-assigned managed identity is granted the AcrPull role.
This allows the Container App runtime to authenticate against the private ACR.

Key Concept

Configuring secure private registry access using managed identities in Azure Container Apps
Rate this question