I was following the steps in this Microsoft tutorial: https://docs.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?
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://docs.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.