Open divyanshursahu opened 3 months ago
Most probably it is for the same reason as for GCR (see https://github.com/enix/kube-image-keeper/issues/267#issuecomment-2042975871). However, the Azure officiel helper seems to be unmaintained: https://github.com/Azure/acr-docker-credential-helper
The Azure official helper is deprecated permanently: https://github.com/Azure/acr-docker-credential-helper as mentioned in the page. Although I tried it, but it was not working. They recommend using any other method mentioned on the page https://learn.microsoft.com/en-us/azure/container-registry/container-registry-authentication?tabs=azure-cli.
We are already using managed identities to authenticate between AKS and ACR to pull images from ACR and it is working when we create a pod or do a simple deployment but when kuik is enabled for the namespace and we try to create the deployment or pod from the image in ACR we get the authentication error as mentioned above in the problem.
I have installed KUIK v1.8.0 in an AKS cluster but after kuik deployment when I am trying to pull the image from Azure ACR it is failing, and I am getting errors like below.
ACR is already linked with AKS cluster and was able to pull image from ACR and container was starting but post KUIK installation it is failing
$ kubectl describe pod div-redis-745cbd8d7d-tk8rm
Normal Pulling 17m (x4 over 19m) kubelet Pulling image "localhost:7439/acr.azurecr.io/redis/div-redis:1.0"
Warning Failed 17m (x4 over 19m) kubelet Failed to pull image "localhost:7439/acr.azurecr.io/redis/div-redis:1.0": failed to pull and unpack image "localhost:7439/acr.azurecr.io/redis/div-redis:1.0": failed to resolve reference "localhost:7439/acr.azurecr.io/redis/div-redis:1.0": unexpected status from HEAD request to http://localhost:7439/v2/acr.azurecr.io/redis/div-redis/manifests/1.0: 401 Unauthorized
Warning Failed 17m (x4 over 19m) kubelet Error: ErrImagePull
Warning Failed 17m (x6 over 19m) kubelet Error: ImagePullBackOff
Normal BackOff 4m16s (x65 over 19m) kubelet Back-off pulling image "localhost:7439/acr.azurecr.io/redis/div-redis:1.0"
Cached image describe: