Soru

Zorluk: OrtaRun Containerized Solutions using Azure Container Instances

You are configuring a deployment to Azure Container Instances (ACI). The container must pull its image from a private Azure Container Registry (ACR) and retrieve its database connection strings from Azure Key Vault during startup. You need to configure the authentication and access policies to ensure secure and successful deployment. Which two configurations are required to meet these requirements? (Choose two.)

  1. Configure a user-assigned managed identity for the container group and grant it the AcrPull role on the private Azure Container Registry.Cevap
  2. Grant the container group's managed identity GET permission on Key Vault Secrets in the Key Vault access policies.Cevap
  3. C
    Configure a system-assigned managed identity for the container group and grant it the AcrPull role on the private Azure Container Registry.
  4. D
    Grant the Azure Container Registry service principal GET permission on Key Vault Secrets in the Key Vault access policies.
  5. E
    Include the az acr login command in the container's startup script to authenticate and pull the image from the registry.

Cevap

Configure a user-assigned managed identity for the container group with the AcrPull role on the Azure Container Registry, and grant the container group's managed identity GET permission on Secrets in the Key Vault access policies.
To deploy an ACI container group that pulls from a private ACR and retrieves secrets from Key Vault, a user-assigned managed identity is required for the ACR pull since the identity must exist before container group creation. Additionally, that same managed identity must be granted GET permission in Key Vault access policies to allow the application code to retrieve database connection strings at startup.

Adım Adım Çözüm

1
Select the correct identity type for registry authentication.
A user-assigned managed identity is chosen and assigned to the ACI container group, and then granted the AcrPull role on the ACR.
Azure Container Instances (ACI) requires a user-assigned managed identity to authenticate and pull images from a private Azure Container Registry during the container group creation phase. A system-assigned managed identity cannot be used because it is only created after the container group is deployed.
2
Configure Key Vault access for the application.
The managed identity of the container group is granted GET permission for secrets in the Key Vault access policy.
To retrieve secrets at startup, the ACI container group's identity must have explicit read access (GET permission) to Key Vault Secrets.

Anahtar Kavram

Configuring private registry access and Key Vault integration for Azure Container Instances using managed identities.
Bu soruyu puanla