Interview Prep/Azure/AKS and ACR Errors

Service of type LoadBalancer stuck with `EXTERNAL-IP <pending>`; events show `Error syncing load balancer: failed to ensure load balancer: ... AuthorizationFailed ... 'Microsoft.Network/virtualNetworks/subnets/read'`.

IntermediateTroubleshootingAKS and ACR Errors
Answer

Likely causes → The cluster's control-plane identity lacks rights on a custom VNet subnet (in another RG), or on the RG of a pre-created public IP.

Diagnose →

kubectl describe svc web -n shop | sed -n '/Events/,$p'
az aks show -g rg -n aks --query identity.principalId -o tsv

Fix → Grant Network Contributor on the subnet (or VNet) to the cluster identity; for static IPs in another RG, grant it on that RG and use the azure-load-balancer-resource-group annotation.

Prevent → Include cluster identity network roles in the cluster IaC.

Azure All Azure questions Roadmap: AKS & Azure DevOps

More on AKS and ACR Errors