After enabling Entra integration and disabling local accounts, the CI pipeline fails with `error: You must be logged in to the server (Unauthorized)`.
IntermediateTroubleshootingAKS and ACR Errors
Answer
Likely causes → CI was using az aks get-credentials --admin (local admin cert), which no longer works, or kubeconfig still uses interactive kubelogin.
Diagnose → Check the pipeline's credential step and kubeconfig exec args.
Fix →
az aks get-credentials -g rg -n aks --overwrite-existing
kubelogin convert-kubeconfig -l azurecli
Grant the CI identity an AKS RBAC role.
Prevent → Use Entra-based CI auth before disabling local accounts.
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