AKS is not able to pull images from ACR

Daniel Grothman 1 Reputation point
2025-02-16T22:45:37.2833333+00:00

I am unable to get our AKS to be able to pull images from our ACR. I get the following error

on the pod

Failed to pull image "**REMOVE**.azurecr.io/**REMOVED**:dev": [rpc error: code = NotFound desc = failed to pull and unpack image "**REMOVED**.azurecr.io/**REMOVED**:dev": no match for platform in manifest: not found, failed to pull and unpack image "**REMOVED**.azurecr.io/**REMOVED**:dev": failed to resolve reference "**REMOVED**.azurecr.io/**REMOVED**:dev": failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://**REMOVED**.azurecr.io/oauth2/token?scope=repository%3A**REMOVED**%3Apull&service=**REMOVED**.azurecr.io: 401 Unauthorized]

I have tried removing the connection

az aks update -n <myAKSCluster> -g <myResourceGroup> --detach-acr <acr-resource-id>

and then recreating the connection

az aks update -n <myAKSCluster> -g <myResourceGroup> --attach-acr <acr-resource-id>

I have verified it is using a system managed identity and the identity has the ACRPull permissions

I have tried following the troubleshooting guide
401 unauthorized error

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
483 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,278 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Abiola Akinbade 23,210 Reputation points
    2025-02-16T23:43:12.2833333+00:00

    Since you have confirmed above, maybe also check the image. It may be that the image may not exist for the architecture. See:

    az acr repository show-tags --name <ac> --repository <image>
    

    You can also try normal kubectl commands to see if AKS can reach ACR at all. Inside posde try an nslookup on acr

    nslookup <myacr>.azurecr.io
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.