An Azure service that provides a registry of Docker and Open Container Initiative images.
Hello @RajKumar Kannan ,
Please note that you can't use an AKS managed identity to attach the registry and authenticate to it when AKS cluster and the registry are in different tenants which is most likely why you are getting error with your setup.
Source: https://learn.microsoft.com/en-us/azure/container-registry/authenticate-aks-cross-tenant
Instead of this approach,
Recommended approach will be to use cross‑tenant AKS service principal authentication.
High-level required steps:
- Create a multitenant app registration in Tenant A
- Provision that service principal in Tenant B
- Grant it permission to pull from the registry in Tenant B
- Update the AKS cluster to use that service principal.
For detailed steps, please refer: https://learn.microsoft.com/en-us/azure/container-registry/authenticate-aks-cross-tenant
or
as alternative approach, you could use ImagePullSecret.
Create a pull secret using a service principal that has AcrPull on the ACR, then reference it in the deployment. Detailed steps for this approach can be found out over here: https://learn.microsoft.com/en-us/azure/container-registry/container-registry-auth-kubernetes
Please let us know if this answers your question or if you have any other follow-up query.