When pulling a service-jenkins custom image from ACR, AKS gives the following error:
Warning Failed 0s (x2 over 31s) kubelet Failed to pull image "XXX.azurecr.io/service-jenkins:latest": [rpc error: code = Unknown desc = failed to pull and unpack image "XXX.azurecr.io/service-jenkins:latest": failed to extract layer sha256:XXX: unexpected EOF: unknown, rpc error: code = Unknown desc = failed to pull and unpack image "XXX.azurecr.io/service-jenkins:latest": failed to resolve reference "XXX.azurecr.io/service-jenkins:latest": failed to authorize: failed to fetch anonymous token: unexpected status: 401 Unauthorized]
We have taken the following steps in an attempt to resolve the issue:
- Connected AKS with ACR using SP instead of using secret stored in the same namespace
- Uploaded a sample hello-world image which gets pulled successfully by the AKS
- Verified the image secret matches with the ACR keys
We pulled and executed the service-jenkins image using local docker engine to check if there is some issue with image building, but the container is executing normally.
We are unable to pinpoint the exact issue. Any help is appreciated!