Error & Fix: Azure Kubernetes ‘Failed to pull image’

Error Message: Failed to pull image “rkaks/dotnetcoresqldb:dev”: rpc error: code = Unknown desc = Error response from daemon: pull access denied for rkaks/dotnetcoresqldb, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied

Shown from the Kubernetes Dashboard application

Context

I have my application’s docker image pushed into my Azure container registry at rkimacr.azurecr.io.

The Kubernetes Deployment manifest yaml file specifies the following:

spec:
      containers:
      - name: todolist
        image: rkimacr.azurecr.io/dotnetcoresqldb:dev

The error message indicates it may be an access issue, but I ensured that access is granted. So another troubleshooting step is to find out the image URI, by going to your ACR resource > Repositories, click into the repository of interest:

Fix

Update deployment manifest YAML image to rkimacr.azurecr.io/rkaks/dotnetcoresqldb:dev. I had missed the repository name rkaks in the path.

In conclusion, the root cause as the image URI was incorrect and the error was related to the message indicating the ‘repository does not exist’

References:

http://Authenticate with Azure Container Registry from Azure Kubernetes Servicehttps://docs.microsoft.com/en-us/azure/aks/cluster-container-registry-integration

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s