Pull private registry image with kubernetes-helm app without using imagepullsecret

I am using minikube to develop my Kubernetes application. I have a private azure registry where my images are saved. Whenever I start the app, k8s start to pull an image. It throws the following error

Failed to pull image "myregistry.azurecr.io/myapp:mytag": rpc error: code = Unknown desc = Error response from daemon: Get https://myregistry.azurecr.io/v2/myapp/manifests/mytag: unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.

I am configuring my minikube using this documentation. where first, I log-in to acr using below command,

az acr login --name myregistry.azurecr.io --expose-token

And after using the token provided by the above command, I log-in to my private docker-registry by the below command in minikube ssh.

docker login myregistry.azurecr.io -u 00000000-0000-0000-0000-000000000000

After that as per mention in the document, I copy the .docker/config.json to /var/lib/kubelet/config.json in minikube ssh. Still I am facing above error.

If I manually pull the image using the docker pull command, it works. I tried with imagepullsecret also and it is working. But from the above method, getting an authentication error. Do I have missing any step here? Can you please help me?


Source: Docker Questions