Hello @javier
Thanks for using Q & A forum.
Follow the below Steps-
[Step 1]: Verify Managed Identity and Role Assignment Propagation
Check the Azure Activity Log for the role assignment to confirm it was successfully created. Also, wait for a reasonable amount of time (e.g., 5-10 minutes) after assigning the role before attempting to activate the revision. Sometimes, propagation delays are the root cause.
[Step 2]: Confirm Correct Managed Identity is Used
- In the Azure portal, navigate to your Container App.
- Go to the "Identity" tab.
- Note whether you're using a System-assigned or User-assigned Managed Identity.
- If using a User-assigned Managed Identity, verify that the correct identity is selected.
- Go to your Azure Container Registry.
- Go to "Access control (IAM)".
- Check the role assignments. Ensure the Managed Identity you noted in steps 3 or 4 has the "ACRPull" role assigned to it. The "Principal" should match the name of your Managed Identity.
[Step 3]: Check Container App Configuration for Image Pull Authentication
The container app needs to be configured to use the Managed Identity for pulling the image. While the portal often handles this automatically, it's worth verifying. If you're using the Azure CLI, ensure the acr-pull-managed-identity
parameter is correctly set when creating or updating the container app. If you're using an ARM template, ensure the identity
block is correctly configured.
Example Azure CLI command:
az containerapp update \
--name <container_app_name> \
--resource-group <resource_group_name> \
--registry-server <acr_name>.azurecr.io \
--acr-pull-managed-identity <managed_identity_client_id>
If using a system-assigned managed identity, you can omit the --acr-pull-managed-identity
parameter.
[Step 4]: Investigate Health Probes
- In the Azure portal, navigate to your Container App.
- Go to the "Revisions management" tab.
- Click on the failing revision.
- Examine the "Health status" section. If the probes are failing, investigate the logs of your container to determine why. A failing health probe can cause the container to continuously restart, leading to activation errors.
[Step 5]: Check Azure Container Registry Network Rules (If Applicable)
- In the Azure portal, navigate to your Azure Container Registry.
- Go to "Networking".
- If "Public network access" is disabled or "Selected networks" is enabled, ensure that the container app's subnet or IP address is allowed to access the registry. You might need to add a virtual network rule or an IP address rule. If the container app is integrated with a virtual network, you'll likely need to add a virtual network rule.
[Step 6]: Examine Container App Logs (Even if Limited)
Even if you're not seeing detailed logs, check the container app's logs for any error messages or clues. Go to the "Monitor" section and then "Logs". Use Kusto Query Language (KQL) to query the logs. For example:
Container
If the Answer is helpful, please click Accept Answer
and Up-Vote, so that it can help others in the community looking for help on similar topics.