ImagePullBackOff error in Kubernetes while pulling docker images from private dockerhub registry ImagePullBackOff error in Kubernetes while pulling docker images from private dockerhub registry azure azure

ImagePullBackOff error in Kubernetes while pulling docker images from private dockerhub registry


I believe this error indicates your kubernetes cluster doesnt have access to docker registry. You'd need to create docker secret for that. like so:

kubectl create secret generic regcred \  --from-file=.dockerconfigjson=<path/to/.docker/config.json> \  --type=kubernetes.io/dockerconfigjson

or from command line:

kubectl create secret docker-registry regcred --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> --docker-email=<your-email>

https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/


Configure ACR integration for existing AKS clusters

az aks update -n myAKSClusterName -g myAKSResourceGroupName --attach-acr acr-name

https://docs.microsoft.com/en-us/azure/aks/cluster-container-registry-integration

Solved the issue for me


The answer above is correct, just need to add that you have to put imagePullsecrets on your deployment. Read the link provided on the other answer, it explain it in detail:

https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/