Reputation: 41
I was following the steps in this Microsoft tutorial: https://learn.microsoft.com/en-us/azure/aks/tutorial-kubernetes-prepare-acr#container-registry-login
I've created a resource group, and then an azure container registry with "az acr create". The next step is to login to the registry, but I keep getting this error: Error response from daemon: Get https://azurereg.azurecr.io/v2/: Service Unavailable
Any ideas?
Upvotes: 4
Views: 12503
Reputation: 642
I got the same error while logging to ACR
Then I use the following command to access the ACR
docker login myacrreg.azurecr.io -u myacrreg -p xF1ioa6K4FkKqbtt7j2yPf4rja6tiNvFhT34iq/tUx+ACRCNwSlG
you can find this username and password from the following
To check images (image list in the ACR)
docker images myacrreg.azurecr.io
Change local image tag with ACR image
docker tag myimage12:v1 myacrreg.azurecr.io/myimage12:v1
Push into ACR
docker push myacrreg.azurecr.io/myimage12:v1
Upvotes: 0
Reputation: 2683
In order to access ACR from AKS, you can use the underlying service principal. That said, you've to create a role assignment for the Service Principal as mentioned in this paragraph https://learn.microsoft.com/en-us/azure/container-registry/container-registry-auth-aks?toc=%2fazure%2faks%2ftoc.json#grant-aks-access-to-acr
Creating a role assignment for role Reader
currently doesn't work. You've to create the assignment for the Owner
role. (described in https://github.com/Azure/AKS/issues/76).
Keep in mind that K8s caches the token for a couple of minutes. It took 3-5 minutes on my cluster to work.
Upvotes: 0