You are deploying a containerized application to Azure Container Instances (ACI). The container image is stored in a private Azure Container Registry (ACR). You create a user-assigned managed identity and assign it the AcrPull role on the ACR. However, when you attempt to deploy the container group, the deployment fails with an error indicating that the image cannot be pulled. What is the most likely cause of this failure?
- The container group deployment configuration is missing the identity reference within the image registry credentials section.Answer
- BThe developer did not execute the az acr login command to authenticate the local shell before initiating the container group deployment.
- CThe container group must use a system-assigned managed identity instead of a user-assigned managed identity to authenticate registry pulls.
- DThe user-assigned managed identity lacks GET secret permissions in the associated Azure Key Vault access policy.
Answer
The container group deployment configuration is missing the identity reference within the image registry credentials section.
The correct option is correct because assigning a user-assigned managed identity to the container group is a two-step process: you must define the identity on the container group, and you must explicitly link that identity to the registry credentials under the image registry credentials section in the deployment template or command. If the second step is omitted, ACI will attempt to pull the image anonymously, which fails for private registries.
Step-by-Step Solution
Key Concept
Azure Container Instances image pull authentication using managed identities