Managed Identity - Azure Container Instance and Container Registry

Velluva, Anoop 65 Reputation points
2024-01-19T16:25:22.4033333+00:00

Can Azure Container Instance be configured to pull images from a private Container Registry using managed identity? I am currently developing a CI/CD pipeline to automate the deployment of a standalone Python simulation application to the Container Instance. Moreover, I would welcome your suggestions on scheduling the Container Instance to run daily.

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
401 questions
Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
649 questions
0 comments No comments
{count} votes

Accepted answer
  1. Konstantinos Passadis 17,301 Reputation points MVP
    2024-01-19T16:40:22.5333333+00:00

    Hello @Velluva, Anoop ! Yes you can do that , suppose your Private Registry integrates Authentication or is a an Azure Container Registry aci2

    You have to Assign the role ACRPULL to your Managed Identity

    az role assignment create --assignee $principalId --role acrpull --scope $(az acr show --name myRegistry --resource-group myResourceGroup --query id --output tsv)
    
    
    

    For a Schedule you can integrate Logic Apps , or Cron in the Python application if it supports scheduling. Also Azure Functions or Azure Automation may help you ! LINKS https://learn.microsoft.com/en-us/azure/container-instances/container-instances-managed-identity https://learn.microsoft.com/en-us/azure/container-instances/container-instances-stop-start   I hope this helps! Kindly mark the answer as Accepted and Upvote in case it helped! Regards

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful