Soru

Zorluk: KolayDeploy and Configure Azure Container Apps

A developer is deploying a new containerized API to Azure Container Apps. The container image is hosted in a private Azure Container Registry (ACR). Which of the following configurations is required to enable the Container App to pull the image from the private registry?

  1. Configure a managed identity on the Container App and grant it the AcrPull role on the Azure Container Registry.Cevap
  2. B
    Run the `az acr login` command on the local development machine prior to deploying the Container App.
  3. C
    Configure the Azure Container Registry with a system-assigned managed identity pointing to the Container App.
  4. D
    Create an Azure Key Vault access policy that grants the Azure Container Registry GET access to the Container App's secrets.

Cevap

Configure a managed identity on the Container App and grant it the AcrPull role on the Azure Container Registry.
The correct configuration requires assigning a managed identity to the Container App and granting that identity the AcrPull role on the Azure Container Registry. This ensures the Container App has the necessary runtime permissions to authenticate and download the container image securely.

Adım Adım Çözüm

1
Enable a managed identity (system-assigned or user-assigned) on the Azure Container App.
The Container App gets an identity that Azure Active Directory (Azure AD) can authenticate.
The Container App needs a security principal to request access to other Azure resources.
2
Assign the AcrPull role to the Container App's managed identity on the scope of the Azure Container Registry.
The identity is authorized to pull container images from the registry.
Azure Role-Based Access Control (RBAC) enforces that only authorized identities can read private registry images.
3
Configure the Container App registry settings to use the managed identity for authentication.
The Container App pulls the image successfully during deployment.
The Container App environment must know which identity to present when requesting the image from ACR.

Anahtar Kavram

Azure Container App private registry authentication using managed identities
Bu soruyu puanla