Question

Difficulty: EasyDeploy and Configure Azure Container Apps

You are deploying a containerized application to Azure Container Apps. The container image is hosted in a private Azure Container Registry (ACR). Which two methods can you use to configure the Container App to authenticate and pull the image from the private registry? (Select two.)

  1. Enable a Managed Identity on the Container App and assign it the AcrPull role on the Azure Container Registry.Answer
  2. Enable the admin user account on the Azure Container Registry and configure the registry credentials directly in the Container App settings.Answer
  3. C
    Configure the container startup command to execute the 'az acr login' CLI command at runtime.
  4. D
    Configure a System-Assigned Managed Identity on the Azure Container Registry and grant it owner permissions over the Container App environment.

Answer

Enable a Managed Identity on the Container App and assign it the AcrPull role, or enable the admin user account on the Azure Container Registry and configure the credentials in the Container App.
To pull images from a private Azure Container Registry, Azure Container Apps supports either enabling a managed identity on the Container App with the AcrPull role, or using registry credentials (admin user credentials) stored as secrets in the Container App.

Step-by-Step Solution

1
Identify that Azure Container Apps must authenticate to the private registry before container creation.
The platform needs credentials or an identity to pull the image.
Since the registry is private, public anonymous pulls are not permitted.
2
Evaluate the managed identity authentication method.
Assigning a managed identity to the Container App with the AcrPull role is a supported secure method.
Managed identities provide a passwordless way to authenticate Azure resources.
3
Evaluate the registry credentials method.
Using the ACR admin username and password configured in the Container App registry settings is a supported fallback method.
Standard username/password authentication is supported by configuring registry secrets in the Container App.

Key Concept

Azure Container Apps private registry authentication methods
Rate this question