`az acr build` fails with `denied: client with IP '20.x.x.x' is not allowed access`.
IntermediateTroubleshootingAKS and ACR Errors
Answer
Likely causes → ACR firewall/public access restrictions; ACR Tasks agents run outside your network.
Diagnose → az acr show -n acrshop --query "{public:publicNetworkAccess, rules:networkRuleSet, bypass:networkRuleBypassOptions}"
Fix →
- Allow trusted services (
--allow-trusted-services true) and run tasks with a system identity, or use a dedicated agent pool in your VNet (az acr agentpool create --subnet-id ..., Premium) - Or build on private agents with
docker buildand push via the private endpoint
Prevent → Decide build location when locking down registries.
More on AKS and ACR Errors
Pods show `ImagePullBackOff` with `failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://acrshop.azurecr.io/oauth2/token?...: 401 Unauthorized`.Beginner`Failed to pull image "acrshop.azurecr.io/shop/web:v3": ... manifest unknown` or `not found`.Beginner`ImagePullBackOff` with `dial tcp: lookup acrshop.azurecr.io on 168.63.129.16:53: no such host` or connection timeouts to the registry.Advanced`exec /usr/local/bin/python: exec format error` in pod logs right after deploying a new image.BeginnerPods are `Pending`: `0/3 nodes are available: 3 Insufficient cpu. preemption: 0/3 nodes are available: 3 No preemption victims found for incoming pod.`BeginnerCluster autoscaler events show `pod didn't trigger scale-up: 1 max node group size reached` or `NotTriggerScaleUp`.Intermediate