AKS Hour 8 (optional): 50 production problems + 50 interview questions
Use the first seven hours to build two skills: when you see an AKS error, know which layer it comes from and which command to run first; in an interview, explain in two minutes what AKS does for you and what it leaves to you
A: 50 production problemsB: 50 interview questionsAKS · Kubernetes 1.34–1.37 · az CLI 2.93Verified on 2026-11-15
Overall learning goals
Given a raw error message (ARM error code, CSE exit code, kubelet event, kubectl output), work out which layer it belongs to, cluster creation/nodes/upgrades, networking/ingress/DNS, identity/security/ACR, or scaling/storage/cost/operations, and name the first diagnostic command.
Understand the mechanisms behind each problem: AKS resource provider (RP) → node resource group MC_* → VMSS → CSE (Custom Script Extension) bootstraps the node → kubelet registration; cordon/drain/PDB during surge upgrades; SNAT and subnet IP limits; the Workload Identity token exchange; kubelet identity pulling images from ACR.
Be able to reproduce, diagnose, fix, and clean up 16 typical faults on a lab cluster (most faults fail during ARM validation and cost almost nothing).
Be able to answer the 50 AKS interview questions with the structure “30-second answer → mechanism → commands/configuration → production experience,” and handle common follow-up questions and scenario design questions.
Use mock interviews (timed, self-rated) to measure your mastery and find weak modules.
Problems 13–25: Service CIDR conflicts, DNS IP out of range, insufficient subnet, SNAT exhaustion, restricted egress, authorized IPs, private cluster access, private DNS zone links, custom DNS zone permissions, 10250 tunnel, Pod DNS, NSG/LB, ingress 502 and Ingress-NGINX retirement
50 “error → first command → fix” entries; 50 flash cards; 8 mixed faults; full mock interviews
Full mock interview
Final quiz (12 questions)
Knowledge coverage matrix
Topic
m1
m2
m3
m4
m5
m6
m7
m8
ARM / AKS RP / MC_* / VMSS / CSE
●
●
—
●
●
—
—
—
Quota, capacity, availability zones
●
—
—
●
●
—
●
●
Versions, upgrades, PDBs, maintenance windows
●
—
●
●
●
—
●
●
CNI / IP planning / outbound / SNAT
●
●
—
●
—
●
—
●
Private clusters / DNS / ingress
●
●
—
—
—
●
—
●
Entra / RBAC / local accounts / kubelogin
—
—
●
—
●
●
—
●
Workload Identity / Key Vault / ACR
—
—
●
—
—
●
—
●
Policy / Safeguards / Defender
—
—
●
—
—
●
—
●
CA / NAP / HPA / KEDA / VPA
—
—
—
●
—
—
●
●
Storage / backup / cost / observability
—
—
—
●
●
—
●
●
Fleet / GitOps / IaC / multi-cluster
—
—
—
—
—
—
●
●
What this hour does not cover (and where to learn it)
General Kubernetes failures (CrashLoopBackOff, probes, scheduling principles, Service/Endpoint basics) → the 50 problems in K8s Hour 9; AKS basics → K8s Hour 6. This hour covers only problems that appear on AKS or have AKS-specific fixes.
Helm errors when deploying to AKS (release status, template rendering, OCI/ACR push) → Helm Hour 3 and Helm Hour 8.
Dedicated troubleshooting for Windows node pools, GPU drivers, and the Istio add-on → follow the AKS troubleshooting docs on learn.microsoft.com; this hour mentions them only in interview questions.
How to use this hour
When troubleshooting (Part A)
Open the quick reference for the relevant module and paste the most distinctive word from the error (such as QuotaExceeded, exit status 50, SubnetIsFull, AADSTS700213, or Multi-Attach) into the filter box.
Click a table row to jump to the problem details, then follow “diagnose → compare with the output → fix.”
Not sure which layer the problem is in? Use the decision trees and simulators on the animation pages.
Before the interview (Part B)
Start with the quick reference and pick out the questions you're unsure about, by difficulty.
Mock interview: random questions, a 2-minute countdown, answer before you check, then self-rate as “answered / partial / didn't know.” Scores are saved in this browser.
The quick reference is designed to be printed and pinned up at your desk.
Capstone lab: 8 mixed faults + a full mock interview (10 picked from 50) + the final quiz.
Each problem links back to the matching section of Hours 1–7, so you can go back and review.
Structure of entries in Parts A and B
Part A · 50 production problems
Symptom → root cause (at the mechanism level) → diagnostic commands → example expected output → fix → prevention and best practices → see Hour N. Where possible, titles use the raw error text from the Microsoft AKS troubleshooting docs (learn.microsoft.com/troubleshoot/azure/azure-kubernetes; source repo MicrosoftDocs/SupportArticles-docs, read 2026-11-15). Where the docs don't give the raw text, or the wording changes between versions, it is marked “exact wording may vary.”
Part B · 50 interview questions
Question → 30-second answer → in-depth answer (mechanism, commands/configuration) → common follow-ups → bonus points → common wrong answers. Difficulty: JuniorMid-levelSenior. Aimed at Senior Cloud / Platform Engineer interviews.
Troubleshooting methodology, NotReady nodes, IP and subnet exhaustion, SNAT, LB/ingress/DNS, upgrade failures, identity and ACR pulls
Version notes (verified 2026-11-15) The current GA Kubernetes minor versions on AKS are 1.34–1.37 (1.34 community support ends in 2026-11; 1.38 entered preview in 2026-11 and is planned for GA in 2027-02). LTS requires the Premium tier, and each LTS version is supported for 24 months. Clusters that stay on an unsupported version past the platform support grace period are forced to upgrade by a platform-initiated upgrade, which ignores maintenance windows and PDBs and does not stop for deprecated-API checks. kubenet retires on 2028-03-31; Azure NPM (Linux) retires on 2028-09-30; the NGINX in the application routing add-on receives only critical security patches until 2026-11, and the long-term direction is Gateway API. The current Azure CLI version is 2.93.0. All “expected output” examples are samples; IDs, IPs, and names will differ in your environment.
Module 0 · How to use this hour and the fault-lab environment
Before class · Reuse rg-aks-lab / aks-lab / myapp from the first seven hours, and “create faults” in the lab8- namespace and the temporary aks-lab-net cluster
10 minutes before classIncurs Azure costs
Goals for this module
Confirm that Azure CLI, kubectl, and kubelogin work, and that rg-aks-lab, the cluster aks-lab, and an ACR already exist in your subscription (or rebuild them as in Hour 1).
Understand this hour's lab cost model: most faults fail during ARM validation (no resources are created). The experiments that need a running cluster are concentrated on aks-lab and one temporary network cluster, aks-lab-net.
Remember the safety rule: only create faults in the lab8-* namespaces and the aks-lab* clusters, and clean up as soon as you finish.
Prerequisites
Complete Hour 1, Module 0: your subscription has rg-aks-lab (canadacentral), the cluster aks-lab (Entra integration + Azure RBAC, with the OIDC issuer and Workload Identity enabled), an ACR named acraks<suffix>, and the images myapp:1.0 / myapp:1.1.
Tools: Azure CLI 2.93.x (some commands need the aks-preview extension, noted in each entry), kubectl, kubelogin, jq; optionally the kubectl node-shell plugin (for SNAT and node diagnostics).
Required Azure roles: Contributor + User Access Administrator on rg-aks-lab (for the role assignment experiments), and Azure Kubernetes Service RBAC Cluster Admin on the cluster.
Step 1: Environment variables and self-check
RG=rg-aks-lab; LOC=canadacentral; CLUSTER=aks-lab
ACR=$(az acr list -g $RG --query "[0].name" -o tsv); echo "ACR=$ACR"
az version --query '"azure-cli"' -o tsv
az aks show -g $RG -n $CLUSTER --query "{k8s:kubernetesVersion,state:powerState.code,prov:provisioningState,tier:sku.tier,net:networkProfile.networkPluginMode,nrg:nodeResourceGroup}" -o table
az aks get-credentials -g $RG -n $CLUSTER --overwrite-existing
kubectl get nodes -o wide
ACR=acraks21837
2.93.0
K8s State Prov Tier Net Nrg
------ ------- --------- -------- ------- -------------------------------------
1.36.3 Running Succeeded Standard overlay MC_rg-aks-lab_aks-lab_canadacentral
NAME STATUS ROLES AGE VERSION INTERNAL-IP
aks-nodepool1-31718369-vmss000000 Ready <none> 2d v1.36.3 10.224.0.4
aks-nodepool1-31718369-vmss000001 Ready <none> 2d v1.36.3 10.224.0.5
Was the cluster stopped with az aks stop? Run az aks start -g $RG -n $CLUSTER first. Was the cluster deleted? Rebuild it following Hour 1, Module 3 (recommended: 2 × Standard_D4s_v5, Standard tier).
Step 2: myapp baseline (each module's faults are created on its replicas)
namespace/lab8-base created
deployment.apps/myapp created
service/myapp exposed
deployment "myapp" successfully rolled out
Step 3: Common diagnostic tools
az extension add --name aks-preview --upgrade --yes # Only for preview commands such as az aks operation show-latest
az aks operation show-latest -g $RG -n $CLUSTER -o table # Most recent cluster operation and its error (requires aks-preview)
az aks nodepool list -g $RG --cluster-name $CLUSTER --query "[].{n:name,v:orchestratorVersion,prov:provisioningState,cnt:count,surge:upgradeSettings.maxSurge}" -o table
az monitor activity-log list -g $RG --offset 2h --status Failed --query "[].{op:operationName.value,msg:properties.statusMessage}" -o table
kubectl get events -A --field-selector type=Warning --sort-by=.lastTimestamp | tail -20
Costs, risks, and cleanup
Only create faults in the lab environment: the experiments in this hour change the API server authorized IPs, NSG rules, PDBs, role assignments, and federated credentials. Before each action, confirm the lab subscription and aks-lab* with kubectl config current-context and az account show. Any operation that modifies the MC_* node resource group is not supported in production; this hour demonstrates it only with an NSG on a BYO VNet.
Resource
Estimated cost (sample estimate; the Azure pricing calculator is authoritative)
When to delete
aks-lab (2 × D4s_v5, Standard tier)
About US$0.5 per hour
Run az aks stop after class; delete the resource group when you no longer study
aks-lab-net (Module 2, 1 × D2s_v5 + BYO VNet)
About US$0.2 per hour
Delete immediately when Module 2 ends
Experiments that fail ARM validation (quota, CIDR, skipped-version upgrades)
No resources are created; essentially no cost
—
for ns in $(kubectl get ns -o name | grep 'namespace/lab8-' | cut -d/ -f2); do kubectl delete ns "$ns" --wait=false; done
az aks delete -g $RG -n aks-lab-net --yes --no-wait 2>/dev/null
az aks stop -g $RG -n $CLUSTER # Pause billing (control plane and nodes)
# When you no longer need anything: az group delete -n $RG --yes --no-wait
Connection to the previous hour
The Hour 7 troubleshooting methodology (first locate the layer: ARM/RP → node bootstrap → Kubernetes → application), az aks kollect, kubectl debug node/…, and Diagnose and solve problems are all reused here.
This hour adds the namespace prefix lab8-; temporary clusters are named aks-lab-<topic>.
Module 1 · Part A: Cluster creation, nodes, and upgrades (problems 1–12)
00:00 – 08:00 · ARM validation, quota and capacity, CSE bootstrap exit codes, version rules, surge/drain/PDB, concurrent operations, and the Failed state
8 minutesARM → AKS RP → VMSS → CSE → kubelet12 problems
Learning goals
Explain where a failed az aks create or upgrade can stop: ARM validation (RP registration, Policy, parameters) → AKS RP pre-checks (version rules, PDBs, subnet capacity) → compute allocation (quota, regional capacity) → node bootstrap CSE (outbound, API server, DNS) → cordon/drain (PDBs).
From the error code (QuotaExceeded, ZonalAllocationFailed, VMExtensionError_*, UpgradeFailed, OperationNotAllowed), identify who is responsible: subscription quota, Azure regional capacity, your network, your workload, or another operation already in progress.
Know the standard recovery steps after a failure: fix the root cause → retry the original operation, or reconcile a Failed state with az aks update --yes / az aks nodepool update.
Filter by a keyword from the error (such as Quota, exit status 50, PDB, SubnetIsFull, in progress); click a row to jump to the matching entry in “Problem details.”
#1 QuotaExceeded: Operation couldn't be completed because it results in exceeding approved … Cores quota
Create or update VMSS <AKS-VM/VMSS-resource-ID> failed. Operation couldn't be completed because it results in exceeding approved <SKU-family> Cores quota. Additional details - Deployment Model: Resource Manager, Location: <region>, Current Limit: A, Current Usage: B, Additional Required: C, (Minimum) New Limit Required: D.
Symptom: creating a cluster, scaling out, adding a node pool, or upgrading fails. Upgrades are especially prone to this: a surge upgrade temporarily creates maxSurge extra nodes, so quota that is enough normally may not be enough during the upgrade.
Root cause: AKS nodes are instances of the VMSS in the node resource group, so they are limited by the subscription's vCPU quota in that region (total and per VM family). Required = current usage + new nodes × vCPUs per node (plus surge nodes during upgrades). Spot nodes use a separate “low-priority vCPU” quota.
Diagnostic commands
az vm list-usage -l $LOC --query "[?contains(name.value,'DSv5') || name.value=='cores'].{name:localName,used:currentValue,limit:limit}" -o table
az aks nodepool list -g $RG --cluster-name $CLUSTER --query "[].{n:name,vm:vmSize,cnt:count,max:maxCount,surge:upgradeSettings.maxSurge}" -o table
Name Used Limit
------------------------------ ------ -------
Total Regional vCPUs 16 20
Standard DSv5 Family vCPUs 16 20
N Vm Cnt Max Surge
---- --------------- --- --- -----
np1 Standard_D4s_v5 4 6 1
In the example above: 4 nodes × 4 vCPUs = 16; adding 1 surge node needs 20, which exactly hits the limit. If maxSurge were 33%, the request would exceed the quota.
Fix
# 1) Request a higher total vCPU quota for the VM family and region on the portal's Quotas page or with az quota (this takes time, so do it early)
# 2) Temporary: lower the surge, or switch to an in-place upgrade (no extra nodes needed)
az aks nodepool update -g $RG --cluster-name $CLUSTER -n np1 --max-surge 0 --max-unavailable 1
# 3) After the fix, retry the original operation (for a failed upgrade, rerun the same az aks upgrade / nodepool upgrade command)
Prevention and best practices
Write the capacity planning formula into the platform docs: sum of max(node pool maxCount) + maxSurge × vCPUs ≤ quota × 80%.
For large or multi-cluster estates, check quota before each upgrade window (platform-initiated upgrades need the same headroom).
Request quota for critical regions early, and use Azure Monitor quota alerts.
#2 MissingSubscriptionRegistration: The subscription is not registered to use namespace 'Microsoft.OperationsManagement'
Code="MissingSubscriptionRegistration"
Message="The subscription is not registered to use namespace 'Microsoft.OperationsManagement'. See https://aka.ms/rps-not-found for how to register subscriptions."
Symptom: the first AKS cluster in a new subscription fails, or enabling monitoring or an add-on fails. The namespace may also be Microsoft.ContainerService, Microsoft.Monitor, or Microsoft.KubernetesConfiguration (extensions/Flux), and so on.
Root cause: ARM only forwards requests for resource providers that are registered in the subscription. Many enterprise subscriptions are created by scripts that register only an allowlist of RPs, while AKS add-ons indirectly create resources from other RPs (for example, Container Insights needs OperationsManagement / Insights).
Diagnostic commands
for ns in Microsoft.ContainerService Microsoft.OperationsManagement Microsoft.OperationalInsights Microsoft.Insights Microsoft.Monitor Microsoft.KubernetesConfiguration; do
printf "%-36s %s\n" $ns "$(az provider show -n $ns --query registrationState -o tsv)"; done
az provider register -n Microsoft.OperationsManagement --wait
az provider show -n Microsoft.OperationsManagement --query registrationState -o tsv # Retry once it shows Registered
Prevention and best practices
Pre-register the list of RPs AKS needs in your subscription vending process (landing zone vending).
Registration requires subscription-level */register/action permission, which pipeline identities usually lack, so the platform team should do it in advance.
#3 ZonalAllocationFailed: Allocation failed. We do not have sufficient capacity for the requested VM size in this zone
Code: ZonalAllocationFailed
Message: Allocation failed. We do not have sufficient capacity for the requested VM size in this zone. … This is not AKS controlled behavior, please ask help to VMSS team for allocation failure. If the error is due to capacity constrain, consider upgrade with maxUnavailable instead of maxSurge, details: aka.ms/aks/maxUnavailable.
(The same document also lists AllocationFailed and OverconstrainedAllocationRequest.)
Symptom: creating, scaling out, or upgrading fails while quota is sufficient (unlike #1). It succeeds at another time, or with another VM size.
Root cause: this is a shortage of physical capacity in the Azure region or availability zone, not subscription quota. The more constraints there are, the harder allocation becomes: a fixed availability zone, a proximity placement group, ephemeral OS disks, accelerated networking, and a specific SKU generation all shrink the set of hosts that can be chosen (OverconstrainedAllocationRequest).
Diagnostic commands
az vm list-skus -l $LOC --size Standard_D4s_v5 --query "[].{sku:name,zones:locationInfo[0].zones,restrictions:restrictions[].reasonCode}" -o json
az aks nodepool show -g $RG --cluster-name $CLUSTER -n np1 --query "{zones:availabilityZones,vm:vmSize,ppg:proximityPlacementGroupId,os:osDiskType}"
Fix
Short term: retry later; or, for upgrades, use --max-unavailable (in place, no new capacity needed).
Medium term: create a node pool with a similar VM size from a different generation or family (such as D4as_v5 or D4ds_v6), migrate the workloads, then delete the old pool. Relax unnecessary constraints (PPG, single availability zone).
Long term: use On-demand Capacity Reservation for critical capacity, or deploy across multiple regions.
az aks nodepool add -g $RG --cluster-name $CLUSTER -n np2 --node-vm-size Standard_D4as_v5 --zones 1 2 3 --node-count 2 --mode User
Prevention and best practices
Write node pool sizes as a “preferred + fallback” list so you can switch quickly in IaC.
NAP (node auto-provisioning) can choose from multiple SKUs, which naturally reduces single-SKU capacity problems (#43, Q27).
#4 VMExtensionError_OutboundConnFail: AKS Node provisioning failed due to inability to establish outbound connectivity … exit status 50
Unable to establish outbound connection from agents, please see https://aka.ms/aks-required-ports-and-addresses for more information.
Code: "VMExtensionProvisioningError"
Message: CSE failed with 'VMExtensionError_OutboundConnFail'. AKS Node provisioning failed due to inability to establish outbound connectivity to obtain packages with exit status 50. …
Symptom: cluster creation, start, or scale-out fails. The node VMs were created, but the vmssCSE extension reports exit status 50. Common with BYO VNets where a hub firewall was just connected, or a UDR or NSG was changed.
Root cause: node bootstrap is done by a CSE script, which must reach the required FQDNs and ports, such as mcr.microsoft.com, *.data.mcr.microsoft.com, management.azure.com, login.microsoftonline.com, and packages.aks.azure.com. If a UDR sends 0.0.0.0/0 to a firewall that does not allow the AKS FQDN tag (AzureKubernetesService), or an NSG blocks outbound 443, the CSE fails at the first step.
Diagnostic commands
az aks show -g $RG -n $CLUSTER --query "{out:networkProfile.outboundType,subnet:agentPoolProfiles[0].vnetSubnetId}" -o json
# Test the required endpoints from a node (or a jump box in the same subnet)
kubectl debug node/aks-nodepool1-31718369-vmss000000 -it --image=mcr.microsoft.com/azurelinux/busybox:1.36 -- \
sh -c 'nc -vz mcr.microsoft.com 443; nc -vz management.azure.com 443'
nc: mcr.microsoft.com (20.61.99.192:443): Connection timed out
If the node never registered, kubectl debug is not available; use the VMSS instance's run command or a VM in the same subnet for the tests instead.
Fix
Firewall: allow the FQDN tag AzureKubernetesService in application rules, allow UDP 123 (NTP) and the ports the API server needs in network rules, or allow the endpoints one by one as the docs describe.
NSG: do not deny outbound Internet/AzureCloud 443; do not use NSGs to restrict FQDNs (the FQDNs AKS depends on have no fixed IPs).
After the fix, retry the failed cluster or node pool, or reconcile with az aks update -g $RG -n $CLUSTER --yes (#12).
Prevention and best practices
For restricted outbound (--outbound-type userDefinedRouting), validate the firewall rule set in non-production first, and manage the rules with IaC.
If you want no public internet egress at all, consider a network isolated cluster (relies on an ACR cache).
#5 VMExtensionError_K8SAPIServerConnFail (exit 51) / K8SAPIServerDNSLookupFail (exit 52): Agents are unable to … Kubernetes API server
Message="CSE failed with 'VMExtensionError_K8SAPIServerConnFail'. Agents are unable to establish connection to Kubernetes API server. …" (exit status 51)
Message: CSE failed with 'VMExtensionError_K8SAPIServerDNSLookupFail'. Agents are unable to resolve Kubernetes API server name. It's likely custom DNS server is not correctly configured … (exit status 52)
Symptom: outbound Internet works (not exit 50), but the nodes cannot join the cluster. This almost always happens with a private cluster + custom DNS (hub-spoke), or after changes to the API server authorized IP ranges or firewall configuration.
Root cause: the node kubelet must resolve and connect to the API server's FQDN. A private cluster's FQDN lives in the private DNS zone <guid>.privatelink.<region>.azmk8s.io. When the VNet uses custom DNS (for example a DNS forwarder in the hub), the VNet that hosts the forwarder must be linked to this private DNS zone, or azmk8s.io must be conditionally forwarded to Azure DNS 168.63.129.16. Exit 52 = resolution failed (NXDOMAIN/SERVFAIL/timeout). Exit 51 = resolution succeeded but TCP 443 is blocked (NSG, firewall, or an authorized IP range that does not include the node's outbound IP).
Diagnostic commands
FQDN=$(az aks show -g $RG -n $CLUSTER --query "privateFqdn || fqdn" -o tsv); echo $FQDN
az network vnet show -g $RG -n vnet-aks-lab --query dhcpOptions.dnsServers
# On a VM in the same subnet:
nslookup $FQDN; nc -vz $FQDN 443
aks-lab-dns-1a2b3c4d.5e6f7a8b-….privatelink.canadacentral.azmk8s.io
[ "10.50.0.4" ] ← custom DNS (hub forwarder)
** server can't find aks-lab-dns-…privatelink…: NXDOMAIN
Fix
Link the private DNS zone to the hub VNet that runs the custom DNS, or configure a conditional forward on the DNS forwarder for privatelink.<region>.azmk8s.io to 168.63.129.16.
If you use your own private DNS zone (--private-dns-zone <id>), the cluster identity needs Private DNS Zone Contributor on that zone (#21).
exit 51: allow the node subnet to reach the API server on 443 (for a private cluster, the private endpoint IP; for API Server VNet integration, the ILB IP in the delegated subnet).
Prevention and best practices
In private cluster templates, treat “DNS zone + VNet link + forwarding rule” as one module, and automate the links when a new spoke is attached.
For new clusters, evaluate API Server VNet integration to reduce dependence on private endpoints and tunnels (Q18).
#6 K8sVersionNotSupported / OperationNotAllowed: Upgrading Kubernetes version 1.x to 1.y is not allowed. Available upgrades: […]
<ClusterName> is on version 1.25.6 which is not supported in this region. Please use the [az aks get-versions] command to get the supported version list in this region. …
Upgrading Kubernetes version 1.24.9 to 1.26.6 is not allowed. Available upgrades: [1.29.15 1.29.14 …]. For more information, see AKS supported Kubernetes versions …
Symptom: an attempt to jump straight to the target version is rejected. Or the cluster is stuck on a version past end of life, and many operations (even scaling out) start to fail.
Root cause: AKS only allows upgrades to the versions listed by az aks get-upgrades. Usually that means one minor version at a time, and the target must be a currently supported version. The current GA versions are 1.34–1.37 (2026-11). If a cluster has been out of support for too long, the available “next step” may no longer be an adjacent version. If left unresolved, when the platform support grace period ends AKS performs a platform-initiated upgrade: it ignores maintenance windows, may pass PDBs, and does not stop for deprecated-API checks.
Diagnostic commands
az aks get-upgrades -g $RG -n $CLUSTER -o table
az aks get-versions -l $LOC -o table
# Follow the path given by get-upgrades, one step at a time; control plane first, then node pools
az aks upgrade -g $RG -n $CLUSTER --kubernetes-version 1.37.1 --control-plane-only --yes
az aks nodepool upgrade -g $RG --cluster-name $CLUSTER -n nodepool1 --kubernetes-version 1.37.1
Prevention and best practices
Enable the stable or patch auto-upgrade channel and a planned maintenance window. If you need a longer cycle, use LTS on the Premium tier.
Review the AKS release calendar and the AKS release notes each quarter, and build a dashboard of “months until end of life.”
#7 NodePoolMcVersionIncompatible: Node pool version 1.x.y and control plane version 1.a.b are incompatible
BadRequest - NodePoolMcVersionIncompatible
Error: Node pool version 1.x.y and control plane version 1.a.b are incompatible. Minor version of node pool cannot be more than 2 versions less than control plane's version. …
Error: … Minor version of node pool version x is bigger than control plane version a. …
Another example in the upgrade-blocked doc is worded “more than 3 versions less.” The two docs word it differently, so go by what the service actually returns. The principle is the same: the kubelet-to-API-server version skew policy.
Symptom: the control plane has been upgraded several times, but a node pool that has not been touched in a long time cannot be upgraded or scaled. Or a new node pool was specified with a version higher than the control plane.
Root cause: the Kubernetes version skew policy: nodes (kubelet) cannot be newer than the control plane, and cannot lag too far behind. Running --control-plane-only repeatedly and forgetting the node pools lets the skew build up until it can no longer be crossed directly.
Diagnostic commands
az aks show -g $RG -n $CLUSTER --query kubernetesVersion -o tsv
az aks nodepool list -g $RG --cluster-name $CLUSTER --query "[].{pool:name,version:orchestratorVersion,image:nodeImageVersion}" -o table
Fix
Lagging node pool: upgrade the node pool straight to the control plane version. A node pool upgrade can span several minor versions, as long as the target equals the control plane version and is within the allowed range. If the gap is too large, create a new node pool (on the control plane version) → migrate the workloads → delete the old pool (blue-green, Q32).
Node pool version higher than the control plane: upgrade the control plane first.
Prevention and best practices
Use az aks upgrade by default (control plane + all node pools). Use --control-plane-only only when you need to split the work, and list the follow-up node pool upgrades in the change ticket.
Use an Azure Resource Graph query to compare “control plane version vs. lowest node pool version” across all clusters.
#8 UpgradeFailed (PodDrainFailure): Drain node … failed when evicting pod … Cannot evict pod as it would violate the pod's disruption budget
(UpgradeFailed) Drain node aks-<nodepool-name>-xxxxxxxx-vmssxxxxxx failed when evicting pod <pod-name> failed with Too Many Requests error. This error is often caused by a restrictive Pod Disruption Budget (PDB) policy. See https://aka.ms/aks/debugdrainfailures. Original error: Cannot evict pod as it would violate the pod's disruption budget.. PDB debug info: <namespace>/<pod-name> blocked by pdb <pdb-name> with 0 unready pods.
Symptom: the upgrade fails halfway. Some nodes are already on the new version, one node is cordoned (SchedulingDisabled), and the node pool's provisioningState is Failed.
Root cause: a surge upgrade cordons, then drains, each old node. The drain uses the Eviction API. When a PDB does not allow the eviction, the API server returns 429 Too Many Requests. AKS gives up after the drain timeout (default 30 minutes; adjustable with az aks nodepool update --drain-timeout). Typical causes: a single replica with minAvailable: 1; replicas that are not ready (the PDB already allows 0 disruptions); all replicas packed onto the same node.
Diagnostic commands
kubectl get pdb -A
kubectl get pdb -A -o jsonpath='{range .items[?(@.status.disruptionsAllowed==0)]}{.metadata.namespace}/{.metadata.name}{"\n"}{end}'
kubectl get nodes | grep SchedulingDisabled
NAMESPACE NAME MIN AVAILABLE MAX UNAVAILABLE ALLOWED DISRUPTIONS AGE
lab8-m1 myapp-pdb 1 N/A 0 20m
lab8-m1/myapp-pdb
aks-nodepool1-31718369-vmss000000 Ready,SchedulingDisabled <none> 2d v1.36.3
Fix
# Make the PDB satisfiable: add replicas (and spread them across nodes), or temporarily relax the PDB
kubectl -n lab8-m1 scale deploy myapp --replicas=2
# Or, after backing up, temporarily delete or edit the PDB
kubectl -n lab8-m1 get pdb myapp-pdb -o yaml > pdb-backup.yaml
kubectl -n lab8-m1 patch pdb myapp-pdb --type merge -p '{"spec":{"minAvailable":null,"maxUnavailable":1}}'
# Run the same upgrade command again (it continues from where it failed)
az aks nodepool upgrade -g $RG --cluster-name $CLUSTER -n nodepool1 --kubernetes-version 1.37.1
Prevention and best practices
PDB rule: at least 2 replicas, and maxUnavailable: 1 is better than minAvailable: 100%; combine with topologySpreadConstraints.
Run a “PDB health check” before upgrades: the list of PDBs with ALLOWED DISRUPTIONS = 0 must be empty.
Evaluate automatic PDB management (preview, mentioned in the docs) and a longer --drain-timeout. Platform-initiated upgrades can pass PDBs, so do not rely on “holding off” the upgrade.
#9 UnsatisfiablePDB: PDB <ns>/<name> has maxunavailble == 0 can't proceed with put operation
Code: UnsatisfiablePDB
Message: 1 error occurred:
* PDB <pdb-namespace>/<pdb-name> has maxunavailble == 0 can't proceed with put operation
Symptom: the upgrade is rejected right at the start (unlike #8, which fails halfway). No node in the cluster has been touched.
Root cause: AKS runs pre-checks before the upgrade. A PDB with maxUnavailable: 0 (or the equivalent minAvailable = total replica count) never allows eviction, so the upgrade is bound to fail, and it is rejected up front. This is friendlier than #8: it fails early and leaves no half-upgraded state.
Diagnostic commands
kubectl get pdb -A -o custom-columns=NS:.metadata.namespace,NAME:.metadata.name,MAXUNAVAIL:.spec.maxUnavailable,MINAVAIL:.spec.minAvailable,ALLOWED:.status.disruptionsAllowed
Fix
kubectl -n <ns> patch pdb <name> --type merge -p '{"spec":{"maxUnavailable":1}}'
az aks upgrade -g $RG -n $CLUSTER --kubernetes-version 1.37.1 --yes
Prevention and best practices
Use Azure Policy / Gatekeeper (or Deployment Safeguards) to reject PDBs with maxUnavailable: 0.
Third-party charts (such as database operators) often ship with strict PDBs. List the exceptions and how to handle them in the platform admission checklist.
#10 SubnetIsFull (upgrade/scale-out): <SUBNET> with address prefix <PREFIX> doesn't have enough capacity for IP addresses
Failed to scale node pool <AGENT POOL NAME> in Kubernetes service <NAME>. Error: VMSSAgentPoolReconciler retry failed: Code='SubnetIsFull' Message='<SUBNET NAME> with address prefix <PREFIX> doesn't have enough capacity for IP addresses.' Details=[]
Symptom: upgrade or scale-out fails. Most common in Azure CNI (flat VNet, not Overlay) clusters, where each node reserves 1 + maxPods IPs.
Root cause: surge nodes also need IPs. Example: a /24 subnet has 251 usable IPs (Azure reserves 5). With maxPods=30, each node takes 31 IPs, so only 8 nodes fit. A 7-node cluster plus 1 surge node fills it up. In Overlay mode, a node takes only 1 subnet IP, and Pod IPs come from the Pod CIDR (see also #43, Pod CIDR exhaustion).
Diagnostic commands
az aks show -g $RG -n $CLUSTER --query "{plugin:networkProfile.networkPlugin,mode:networkProfile.networkPluginMode,podCidr:networkProfile.podCidr}" -o table
az aks nodepool show -g $RG --cluster-name $CLUSTER -n nodepool1 --query "{maxPods:maxPods,count:count,surge:upgradeSettings.maxSurge,subnet:vnetSubnetId}" -o json
az network vnet subnet show --ids <subnetId> --query "{prefix:addressPrefix,used:length(ipConfigurations)}"
Fix
Immediate: lower maxSurge, or switch to in-place upgrades with --max-unavailable; reduce unnecessary node counts.
Root fix: create the node pool on a larger subnet (node pools can use different subnets) and migrate; or migrate to Azure CNI Overlay (kubenet should also be migrated; it retires on 2028-03-31).
A subnet prefix usually cannot be expanded directly once IP configurations exist; go by the actual result of the VNet operation.
Prevention and best practices
IP planning formula: (maxCount + maxSurge) × (1 + maxPods) (flat CNI), plus headroom for internal load balancers and private endpoints.
New clusters default to Overlay. When Pods must be routable, use dynamic IP allocation (Pod subnet).
#11 OperationNotAllowed: Another operation (<operation-name>) is in progress, please wait for it to finish before starting a new operation
Operation is not allowed: Another operation (<operation-name>) is in progress, please wait for it to finish before starting a new operation. See https://aka.ms/aks-pending-operation for more details
Operation is not allowed: Another agentpool operation (<operation-name>) is in progress, …
Symptom: a pipeline, Terraform, or a colleague is operating on the same cluster at the same time. For example, one is upgrading while another is changing autoscaler parameters, or a previous long-running operation has not finished.
Root cause: the AKS RP serializes write operations on the same managed cluster or node pool, and rejects new PUTs while an operation is unfinished (not yet Succeeded, Failed, or Canceled). Cluster Autoscaler scaling is also a node pool operation, and it can conflict with manual changes.
Diagnostic commands
az aks operation show-latest -g $RG -n $CLUSTER -o table # Requires aks-preview
az aks show -g $RG -n $CLUSTER --query provisioningState -o tsv
az aks nodepool list -g $RG --cluster-name $CLUSTER --query "[].{n:name,prov:provisioningState}" -o table
Status StartTime Name
---------- ------------------------- ---------------
InProgress 2026-11-15T09:12:04Z Upgrading
Upgrading
Fix
Wait for the current operation to finish, then retry. If you confirm it must be stopped, use az aks operation-abort -g $RG -n $CLUSTER or az aks nodepool operation-abort. Aborting does not roll back changes that have already been completed.
If the operation ends in Failed, reconcile it as described in #12.
Prevention and best practices
Serialize IaC and pipelines on the same cluster (Terraform state lock + pipeline concurrency groups). Freeze manual changes during change windows.
In Terraform, ignore node_count when it is managed by CA, so that every apply does not trigger a node pool update.
Symptom: after a previous operation failed, the cluster shows Failed, and the portal says the cluster is in a failed state. Or a node has become NotReady, and Pods are evicted or stuck in Terminating.
Root cause: Failed only means “the last write operation did not succeed”; the workloads are usually still running. The root cause is the error from that operation (#1, #3, #4, #8, and so on). Common causes of a NotReady node: network changes on the node (UDR/NSG/DNS), kubelet or containerd stopped under memory or PID pressure, disk IOPS saturated, SNAT problems, or an underlying VM failure. AKS node auto-repair tries to restart, reimage, or rebuild nodes that stay NotReady for a long time.
Diagnostic commands
az aks operation show-latest -g $RG -n $CLUSTER --query "{status:status,error:error}" -o json # aks-preview
kubectl get nodes; kubectl describe node <node> | sed -n '/Conditions/,/Addresses/p'
kubectl get events -A --field-selector involvedObject.kind=Node --sort-by=.lastTimestamp | tail
az aks kollect -g $RG -n $CLUSTER --storage-account <sa> # Collect node logs (aks-preview)
Fix
# First fix the root cause of the failure, then reconcile (changes no configuration; it only lets the RP converge again)
az aks update -g $RG -n $CLUSTER --yes
az aks nodepool update -g $RG --cluster-name $CLUSTER -n nodepool1
# For a node that stays NotReady: first kubectl drain, then check and reimage the corresponding instance in the portal/VMSS
# (for VirtualMachines-type node pools, use az aks machine list / show to locate the machine)
kubectl drain <node> --ignore-daemonsets --delete-emptydir-data
Reconciling does not fix unresolved quota, policy, network, or capacity problems. If it keeps failing, read the new error details instead of retrying in a loop (advice from the Microsoft troubleshooting docs).
Prevention and best practices
Set alerts for Failed states and NotReady nodes (Activity Log + Container Insights / Managed Prometheus kube_node_status_condition).
Do not modify resources in MC_* directly (use node resource group lockdown to prevent accidental changes).
Figure 1-1: first see at which step it failed, then see why
Figure 1-2: the resource ledger for surge upgrades. Quota, IPs, and PDBs are all required
Node pool surge upgrade failure simulator
Pick a scenario and click “Run” to see at which step the upgrade fails, what state the cluster is left in, and which problem to look at. The flow is simplified from the surge upgrade described in the AKS docs (create surge node → cordon, drain, and reimage old nodes one by one → delete surge nodes).
$ Waiting to run…
Environment and costs The aks-lab from Module 0 (about US$0.5 per hour, sample estimate). Experiments 1-A and 1-D fail during ARM/RP validation and create no new resources. Experiment 1-B runs one node image upgrade (about 10–20 minutes). Required role: Contributor on the resource group. Clean up immediately when finished.
Experiment 1-A: reproduce QuotaExceeded with an oversized request (#1)
RG=rg-aks-lab; LOC=canadacentral; CLUSTER=aks-lab
az vm list-usage -l $LOC --query "[?name.value=='standardDSv5Family'].{used:currentValue,limit:limit}" -o table
# Request a node pool that clearly exceeds the lab subscription's quota (64 vCPU × 20)
az aks nodepool add -g $RG --cluster-name $CLUSTER -n quotatest --node-vm-size Standard_D64s_v5 --node-count 20 --mode User
(QuotaExceeded) … Operation couldn't be completed because it results in exceeding approved standardDSv5Family Cores quota. … Current Limit: 20, Current Usage: 8, Additional Required: 1280 …
Confirm that the failed node pool was not left behind (if a Failed record remains, delete it):
az aks nodepool list -g $RG --cluster-name $CLUSTER --query "[].{n:name,prov:provisioningState}" -o table
az aks nodepool delete -g $RG --cluster-name $CLUSTER -n quotatest --no-wait 2>/dev/null || true
NAME MIN AVAILABLE MAX UNAVAILABLE ALLOWED DISRUPTIONS AGE
myapp-pdb 1 N/A 0 5s
az aks nodepool update -g $RG --cluster-name $CLUSTER -n nodepool1 --drain-timeout 5 # minutes; shortens the lab wait
az aks nodepool upgrade -g $RG --cluster-name $CLUSTER -n nodepool1 --node-image-only --yes
(UpgradeFailed) Drain node aks-nodepool1-…-vmss000000 failed when evicting pod myapp-… failed with Too Many Requests error. … blocked by pdb myapp-pdb with 0 unready pods.
or: (UnsatisfiablePDB) … PDB lab8-m1/myapp-pdb has maxunavailble == 0 can't proceed with put operation
If the node image is already up to date, the command returns “no upgrade needed.” In that case, use a --kubernetes-version for the next patch release instead (still within the support range). After the experiment, set the drain timeout back to its original value (default 30 minutes).
az aks nodepool update -g $RG --cluster-name $CLUSTER -n nodepool1 --labels lab8=one --no-wait
az aks nodepool update -g $RG --cluster-name $CLUSTER -n nodepool1 --labels lab8=two
(OperationNotAllowed) Operation is not allowed: Another agentpool operation (Updating) is in progress, please wait for it to finish before starting a new operation. See https://aka.ms/aks-pending-operation for more details
Wait and retry:
az aks nodepool wait -g $RG --cluster-name $CLUSTER -n nodepool1 --updated --interval 15 --timeout 900
az aks nodepool update -g $RG --cluster-name $CLUSTER -n nodepool1 --labels lab8=two
Clean up the label: az aks nodepool update -g $RG --cluster-name $CLUSTER -n nodepool1 --labels "" (check az aks nodepool update --help for the correct way to clear labels)
Experiment 1-D: skipped-version upgrade is rejected (#6)
az aks get-upgrades -g $RG -n $CLUSTER -o table
# If the cluster is on 1.35.x, try upgrading straight to 1.37.x (skipping a minor version)
az aks upgrade -g $RG -n $CLUSTER --kubernetes-version 1.37.1 --yes
(OperationNotAllowed) Upgrading Kubernetes version 1.35.6 to 1.37.1 is not allowed. Available upgrades: [1.36.3 1.36.2 …]. …
If the cluster is already on 1.36, this experiment becomes a real upgrade instead. Check get-upgrades before deciding to run it.
No cleanup needed (the request is rejected and nothing changes).
Video lessons (titles and channels verified with YouTube oEmbed)
Supplementary storyboard (3 minutes, can be recorded yourself) Shot 1: kubectl get pdb -A to find ALLOWED=0. Shot 2: start a node image upgrade, and in another window run kubectl get nodes -w to see the surge node appear and the old node SchedulingDisabled. Shot 3: the PodDrainFailure error; read the PDB debug info. Shot 4: relax the PDB, rerun the same command, and continue from the failure point.
Break “can't connect” down by direction: client → API server (authorized IPs, private cluster, DNS), API server → nodes (konnectivity / 10250), Pod → outside the cluster (outbound type, SNAT, firewall), Pod → Pod / DNS (network policy, NSG, CoreDNS), and outside → Pod (LB, ingress).
Know the address space rules: the Service CIDR must not overlap the VNet or peered networks, and the DNS IP must be inside the Service CIDR. Flat Azure CNI uses 1 + maxPods subnet IPs per node. Overlay takes one /24 from the Pod CIDR per node.
Know the 2026 lifecycle facts: kubenet retires on 2028-03-31. NGINX in the application routing add-on gets only critical security patches until 2026-11. The long-term direction is Gateway API.
Type a keyword (such as CIDR, SNAT, i/o timeout, 10250, privatelink, 502) to filter. Click a row to jump to its details.
#13 ServiceCidrOverlapExistingSubnetsCidr: The specified service CIDR … is conflicted with an existing subnet CIDR
(ServiceCidrOverlapExistingSubnetsCidr) The specified service CIDR <service-cidr-1> is conflicted with an existing subnet CIDR <subnet-cidr-2>
Code: ServiceCidrOverlapExistingSubnetsCidr
Target: networkProfile.serviceCIDR
Symptom: Cluster creation fails. Or the cluster has run for a while, someone adds a subnet (or extends the VNet address space) in the same VNet, and then the next upgrade starts failing with this error.
Root cause: The Service CIDR is an internal virtual address range for the cluster. kube-proxy/Cilium perform DNAT for it on the nodes. If it overlaps a real subnet in the VNet, traffic from the nodes to that subnet is wrongly handled as Service traffic. The AKS RP validates this on every PUT (create and upgrade), so a subnet added later is exposed at the next upgrade.
Diagnostic commands
az aks show -g $RG -n $CLUSTER --query "networkProfile.{svc:serviceCidr,dns:dnsServiceIp,pod:podCidr}" -o table
az network vnet subnet list -g $RG --vnet-name vnet-aks-lab --query "[].{n:name,p:addressPrefix}" -o table
Svc Dns Pod
------------ ---------- ---------------
10.0.0.0/16 10.0.0.10 192.168.0.0/16
N P
------------- -----------
snet-nodes 10.10.0.0/22
snet-pe 10.0.4.0/24 ← falls inside the Service CIDR 10.0.0.0/16
Fix
Move the conflicting subnet to a non-overlapping address range (usually easier than changing the cluster).
The Service CIDR cannot be changed freely on an existing cluster. If the subnet cannot be moved, the only option is to build a new cluster and migrate.
Prevention and best practices
In enterprise IPAM, register each cluster's Service CIDR and Pod CIDR as “reserved: not routable, but must not overlap”, including peered VNets and on-premises networks.
This course uses: VNet 10.10.0.0/16, node subnet 10.10.0.0/22, Pod CIDR 192.168.0.0/16, Service CIDR 10.0.0.0/16, DNS 10.0.0.10. Do not put any 10.0.x.x subnet in the VNet.
#14 DnsServiceIpOutOfServiceCidr: The DNS service IP 10.0.0.10 is out of the range defined by service CIDR 10.200.0.0/16
(DnsServiceIpOutOfServiceCidr) The DNS service IP 10.0.0.10 is out of the range defined by service CIDR 10.200.0.0/16.
Target: networkProfile.dnsServiceIP
Symptom: To avoid #13, you changed --service-cidr but forgot to also change --dns-service-ip (default 10.0.0.10). Creation fails.
Root cause: The ClusterIP of the kube-dns Service must come from the Service CIDR, and it cannot be the first address in that range (.1 is used by the kubernetes Service).
Diagnostic commands
az aks create --help | grep -A3 -- "--dns-service-ip"
Fix
az aks create -g $RG -n aks-lab-net … --service-cidr 10.200.0.0/16 --dns-service-ip 10.200.0.10
Prevention and best practices
In the IaC module, calculate the DNS IP from the Service CIDR (for example, Terraform cidrhost(var.service_cidr, 10)) instead of typing it in twice by hand.
#15 InsufficientSubnetSize: The subnet has fewer free IPs than the new nodes need (Azure CNI flat network)
Code: InsufficientSubnetSize
(Appears when scaling out, upgrading, adding a node pool, or enabling CA. AKS diagnostics also warn proactively when a subnet is too small.)
Symptom: Scaling or upgrading is rejected. It looks like #10 SubnetIsFull, but InsufficientSubnetSize means the RP's pre-check calculated that there is not enough room, while SubnetIsFull means no IP was actually available at allocation time.
Root cause: The RP pre-check calculates requirements based on the network model. kubenet and Overlay need 1 subnet IP per new node. Flat Azure CNI (static allocation) needs new nodes × (1 + maxPods). In dynamic Pod subnet mode, the node subnet and the Pod subnet are calculated separately.
Diagnostic commands
az aks nodepool show -g $RG --cluster-name $CLUSTER -n nodepool1 --query "{maxPods:maxPods,count:count,max:maxCount,surge:upgradeSettings.maxSurge,podSubnet:podSubnetId}" -o json
az network vnet subnet show --ids <nodeSubnetId> --query "{prefix:addressPrefix,ipConfigs:length(ipConfigurations)}"
Fix
Short term: lower maxPods (it can only be set on a new node pool), maxSurge, and maxCount.
Long term: migrate to Azure CNI Overlay (Pods no longer use VNet IPs), or use dynamic IP allocation to put Pods in a separate large subnet.
Prevention and best practices
Platform templates default to Overlay. Use flat mode only when Pods must be routed directly from outside the VNet, and reserve enough addresses in IPAM.
#16 SNAT port exhaustion: apps time out intermittently on outbound calls (dial tcp …:443: i/o timeout), and the load balancer's SNAT connection failure metric rises
Get "https://api.partner.example.com/v1/orders": dial tcp 52.168.x.x:443: i/o timeout
Azure portal → kubernetes load balancer → Metrics → SNAT Connection Count (Connection State = Failed) > 0
→ Used SNAT Ports close to Allocated SNAT Ports
Symptom: Calls from the cluster to the public internet fail intermittently at traffic peaks, while internal calls are fine. Restarting the Pod helps temporarily. The more nodes there are, the less visible it is, and a “hot Pod” on a single node is worse.
Root cause: With outboundType=loadBalancer, a Pod's outbound connections are SNAT'd by the node to the LB's public outbound IP. Each node gets a fixed number of SNAT ports (allocated automatically based on backend pool size, or set manually with --load-balancer-outbound-ports). A large number of short-lived connections to the same destination IP:port, connections that are not reused (a new HTTP client for each request), and piled-up TIME_WAIT all exhaust that node's ports. Only connections to the public internet consume SNAT. Private addresses do not.
Diagnostic commands
az aks show -g $RG -n $CLUSTER --query "networkProfile.{type:outboundType,lb:loadBalancerProfile}" -o json
# After you find the node with port exhaustion, count the ESTABLISHED connections to the public internet on that node (Microsoft docs use kubectl node-shell + tcptracer/netstat)
kubectl node-shell aks-nodepool1-31718369-vmss000001
# On the node:
conntrack -L 2>/dev/null | grep -c ESTABLISHED
Fix
Application side (most effective): reuse connections (connection pools, HTTP keep-alive, a singleton HttpClient), and reduce concurrent short-lived connections to the same public endpoint. For Azure services that offer a private endpoint, switch to Private Link.
Platform side: add outbound IPs (--load-balancer-managed-outbound-ip-count) and adjust ports per node, or switch to a NAT Gateway (64,512 ports per public IP, allocated on demand): --outbound-type managedNATGateway for new clusters, or migrate the outbound type of an existing cluster following the docs.
az aks update -g $RG -n $CLUSTER --load-balancer-managed-outbound-ip-count 2 --load-balancer-outbound-ports 4000
# Ports per node × maximum node count ≤ 64000 × number of outbound IPs (otherwise you get InvalidLoadBalancerProfileAllocatedOutboundPorts)
Prevention and best practices
Production clusters should default to NAT Gateway or firewall outbound. Set alerts on the LB's SNAT metrics.
Check for “new HttpClient per request” in code review.
#17 After restricted outbound (UDR + firewall): kubectl logs/exec fails, new nodes cannot bootstrap when scaling, image pulls time out
Certain commands of the kubectl command-line tool don't work correctly, or you experience errors when you create an AKS cluster or scale a node pool.
Error from server: error dialing backend: dial tcp 10.10.0.5:10250: i/o timeout
CSE failed with 'VMExtensionError_OutboundConnFail' … exit status 50
Symptom: The security team changed the cluster's outbound to userDefinedRouting pointing at a hub firewall. Existing Pods keep running, but new node bootstrap fails (#4), the konnectivity tunnel drops (#22), and pulling images from mcr.microsoft.com times out.
Root cause: Almost all AKS outbound dependencies are defined by FQDN, and there are no fixed IPs behind them. NSGs or IP allow lists alone cannot allow them correctly. The firewall lacks the AzureKubernetesService FQDN tag or the required network rules, for example TCP 443/9000 (tunnel) and UDP 1194 to the API server, depending on the tunnel component and cluster type, and NTP UDP 123.
Diagnostic commands
az aks show -g $RG -n $CLUSTER --query networkProfile.outboundType -o tsv
az network route-table route list -g $RG --route-table-name rt-aks -o table
# Firewall logs (Log Analytics): look up denied FQDNs
# AZFWApplicationRule | where Action == "Deny" | summarize count() by Fqdn | top 20 by count_
Fix
Complete the rules following AKS outbound network and FQDN rules. Use the FQDN tag AzureKubernetesService in application rules, plus the FQDNs needed by any add-ons you enable (monitoring, Defender, Key Vault, and so on).
Make sure the UDR does not send node-to-API-server traffic (the private endpoint IP of a private cluster) to the firewall by mistake.
Prevention and best practices
Manage firewall policy as IaC, and review it alongside the AKS add-on inventory.
For requirements that need no public internet access at all, evaluate a network isolated cluster.
#18 API server authorized IP ranges: Unable to connect to the server: dial tcp x.x.x.x:443: i/o timeout
Unable to connect to the server: dial tcp x.x.x.x:443: i/o timeout
(Portal: Unable to reach the api server 'https://<API-server-FQDN>' or api server is too busy to respond. …)
Symptom: kubectl times out from home, from a new office, or from a new CI runner. The Namespaces and Workloads pages in the portal report network errors. A colleague's machine works fine.
Root cause: The cluster was set with --api-server-authorized-ip-ranges, so the API server only accepts connections from the public IPs in the list. The client's egress IP has changed (home broadband, VPN split tunneling, a hosted runner with a dynamic IP), or the network the portal runs from is not in the list.
Diagnostic commands
az aks show -g $RG -n $CLUSTER --query apiServerAccessProfile.authorizedIpRanges -o tsv
curl -s https://ifconfig.me; echo # Your egress IP (third-party service, for lab use only)
203.0.113.10/32
198.51.100.23
Fix
MYIP=$(curl -s https://ifconfig.me)
az aks update -g $RG -n $CLUSTER --api-server-authorized-ip-ranges "203.0.113.10/32,$MYIP/32"
# For temporary troubleshooting, you can also use run command, which does not go through your network:
az aks command invoke -g $RG -n $CLUSTER --command "kubectl get nodes"
Prevention and best practices
CI uses self-hosted runners (fixed egress) or az aks command invoke. People access the cluster through the company's fixed egress or VPN.
For stricter requirements, use a private cluster or API server VNet integration instead of an ever-growing IP list.
#19 Private cluster: kubectl from outside the VNet reports no such host / i/o timeout; az aks command invoke fails
Unable to connect to the server: dial tcp: lookup aks-lab-dns-xxxx.privatelink.canadacentral.azmk8s.io: no such host
Unable to connect to the server: dial tcp 10.10.4.4:443: i/o timeout
Symptom: The cluster is created successfully and the nodes are healthy, but developer laptops and hosted CI runners cannot reach it. Viewing Kubernetes resources in the portal fails.
Root cause: The API server of a private cluster has only a private endpoint IP, and its FQDN resolves only inside VNets linked to the private DNS zone. Clients outside the VNet can neither resolve it nor route to it. The first failure is DNS (no link or conditional forwarding), and the second is routing (no peering, VPN, or ExpressRoute, or an NSG blocks it).
Diagnostic commands
az aks show -g $RG -n $CLUSTER --query "{private:apiServerAccessProfile.enablePrivateCluster,fqdn:privateFqdn,publicFqdn:apiServerAccessProfile.enablePrivateClusterPublicFqdn,vnetInt:apiServerAccessProfile.enableVnetIntegration}" -o json
nslookup <privateFqdn> # On the client
az aks command invoke -g $RG -n $CLUSTER --command "kubectl get pods -A | head"
Fix
Access paths: place a jump box or self-hosted runner in the VNet or a peered VNet. Or connect through VPN/ExpressRoute and link the private DNS zone to the hub (or conditionally forward to 168.63.129.16).
Temporary operations: az aks command invoke runs commands in the cluster through the AKS management plane, so no direct network connection is needed. The cluster must still be able to pull the required images. If it fails, see the “Resolve az aks command invoke failures” doc.
Prevention and best practices
Decide the access paths for a private cluster (people, CI, GitOps, monitoring) at the design stage. Don't patch them afterward.
GitOps (Flux extension) runs inside the cluster, so it fits private clusters naturally (Q42).
#20 CreateOrUpdateVirtualNetworkLinkFailed: A virtual network cannot be linked to multiple zones with overlapping namespaces
Code: CreateOrUpdateVirtualNetworkLinkFailed - SubCode: BadRequest
Message: Reconcile private dns failed
Details: Create or update virtual network link failed. … private dns zone: <GUID>.privatelink.<region>.azmk8s.io; …
Message: A virtual network cannot be linked to multiple zones with overlapping namespaces. You tried to link virtual network with '<GUID>.privatelink.<region>.azmk8s.io' and '<GUID>.privatelink.<region>.azmk8s.io' zones.
Symptom: There are several private clusters in the same VNet (or the hub VNet), and updating or upgrading one of them fails. Or the platform team manually linked a “parent” private DNS zone to the hub.
Root cause: Azure Private DNS does not allow one VNet to be linked to multiple zones with overlapping namespaces, for example privatelink.canadacentral.azmk8s.io and <guid>.privatelink.canadacentral.azmk8s.io. When it reconciles, AKS creates a VNet link for the cluster's own zone, and that conflicts with the existing link.
Diagnostic commands
az network private-dns zone list --query "[?contains(name,'azmk8s.io')].{n:name,rg:resourceGroup}" -o table
az network private-dns link vnet list -g <zoneRG> -z <zoneName> --query "[].{n:name,vnet:virtualNetwork.id}" -o table
Fix
Delete the link that causes the overlap (usually the manually added parent zone link), let AKS's own zone link succeed, then retry the operation.
When several private clusters share DNS, use one self-managed privatelink.<region>.azmk8s.io zone for all of them (--private-dns-zone <id>), instead of one child zone per cluster stacked on a parent zone.
Prevention and best practices
Write the private DNS zone policy as a platform standard (system-managed, self-managed shared zone, or none plus custom DNS), and manage the links with Azure Policy in the landing zone.
#21 CustomPrivateDNSZoneMissingPermissionError: Service principal or user-assigned identity must be given permission to read and write to custom private dns zone
Code: CustomPrivateDNSZoneMissingPermissionError
Message: Service principal or user-assigned identity must be given permission to read and write to custom private dns zone <custom-private-dns-zone-resource-id>. Check access result not allowed for action Microsoft.Network/privateDnsZones/read.
Symptom: Creating a private cluster with --private-dns-zone <custom zone ID> fails. Or, after the platform team “tightened permissions”, cluster updates fail.
Root cause: With a custom private DNS zone, AKS uses the cluster's control plane identity (a user-assigned managed identity) to write A records and VNet links. It needs Private DNS Zone Contributor on the zone, and Network Contributor on a BYO VNet. A system-assigned identity does not exist before the cluster is created, so the custom zone scenario must use a user-assigned identity and grant permissions before creating the cluster.
Diagnostic commands
ID=$(az identity show -g $RG -n id-aks-cp --query principalId -o tsv)
az role assignment list --assignee $ID --all --query "[].{role:roleDefinitionName,scope:scope}" -o table
Fix
az role assignment create --assignee-object-id $ID --assignee-principal-type ServicePrincipal \
--role "Private DNS Zone Contributor" --scope <zoneId>
# Wait a few minutes for the role to propagate, then retry the create or update
Prevention and best practices
In IaC, model the dependency order explicitly: control plane identity → role assignment → cluster.
Don't use a custom role to remove seemingly unrelated read permissions such as privateDnsZones/read.
#22 Error from server: error dialing backend: dial tcp <aks-node-ip>:10250: i/o timeout (kubectl logs, exec, and port-forward fail)
Error from server: error dialing backend: dial tcp <aks-node-ip>:10250: i/o timeout
Error from server: Get "https://<aks-node-name>:10250/containerLogs/<namespace>/<pod-name>/<container-name>": dial tcp <aks-node-ip>:10250: i/o timeout
Symptom:kubectl get works, but logs, exec, attach, port-forward, and top fail. Sometimes they fail only for Pods on some nodes.
Root cause: These commands need the API server to connect back to the kubelet (10250) on the node. The AKS managed control plane is not in your VNet, so it reaches the nodes through a konnectivity tunnel (konnectivity-agent in kube-system). If the tunnel or port 10250 between the nodes is blocked by an NSG, UFW, or a firewall, or the agent Pod is unhealthy, you get a timeout. Clusters with API server VNet integration enabled do not need the tunnel.
Diagnostic commands
kubectl get pods -n kube-system -l app=konnectivity-agent -o wide
kubectl logs -n kube-system -l app=konnectivity-agent --tail=50
kubectl get pod <pod> -o wide # Which node is the failing Pod on?
NAME READY STATUS NODE
konnectivity-agent-7d9c8b6f5-2xk8q 1/1 Running aks-nodepool1-…-vmss000000
konnectivity-agent-7d9c8b6f5-qz7lm 0/1 CrashLoopBackOff aks-nodepool1-…-vmss000001
Fix
Allow TCP 10250 inside the node subnet (an NSG inbound rule with a higher priority than any deny rule). With restricted outbound, allow the outbound ports the tunnel needs (see #17).
If the agent Pod is unhealthy, check outbound (firewall or UDR), then delete the agent Pod so it is recreated.
Prevention and best practices
The baseline rules of a custom NSG should include “allow all between node subnet and node subnet”.
For new clusters, evaluate API server VNet integration.
#23 DNS resolution fails inside a Pod: ;; connection timed out; no servers could be reached / NXDOMAIN (resolution works on the node)
$ kubectl exec -n lab8-m2 dnsutils -- nslookup myapp.lab8-base.svc.cluster.local
;; connection timed out; no servers could be reached
$ kubectl exec -n lab8-m2 dnsutils -- nslookup kv-aks-lab-x.vault.azure.net
** server can't find kv-aks-lab-x.vault.azure.net: NXDOMAIN
Symptom: Resolution fails only for Pods in some namespaces or node pools. Or names inside the cluster work, but private endpoint names (privatelink) resolve to a public IP or NXDOMAIN.
Root causes (by frequency): ① A network policy denies egress by default, with no allow rule for UDP/TCP 53 to kube-dns. ② NSGs block traffic between node pools. (The Microsoft docs describe the case where Pods in a user node pool cannot reach CoreDNS on the system node pool.) ③ A custom DNS server for the VNet cannot resolve Azure private DNS zones, because forwarding to 168.63.129.16 is missing. ④ CoreDNS is overloaded, since ndots:5 amplifies every query. ⑤ The CoreDNS custom configuration (coredns-custom ConfigMap) is wrong.
NSG: allow port 53 between node subnets (including subnets of different node pools). Custom DNS: configure conditional forwarding for the privatelink zones.
High-concurrency scenarios: evaluate LocalDNS (node-local DNS cache, see the Microsoft docs) and lowering ndots.
Prevention and best practices
Make “default deny plus allow DNS” part of the namespace template.
Set alerts on the CoreDNS error rate and latency (coredns_* metrics in Managed Prometheus).
#24 LoadBalancer Service: curl … Failed to connect … Timed out (blocked by a custom NSG) / EXTERNAL-IP stays <pending>
$ curl -Iv http://10.81.x.x
* Trying 10.81.x.x:80...
* connect to 10.81.x.x port 80 failed: Timed out
curl: (28) Failed to connect to 10.81.x.x port 80 after 21033 ms: Timed out
Warning SyncLoadBalancerFailed service/myapp Error syncing load balancer: failed to ensure load balancer: … AuthorizationFailed … does not have authorization to perform action 'Microsoft.Network/virtualNetworks/subnets/read' …
Symptom A: The Service has an IP and the Pods are healthy, but access from the client times out. Symptom B: EXTERNAL-IP stays pending for a long time.
Root cause: A: a custom NSG on a BYO subnet does not allow inbound traffic to the Service port. AKS only manages its own NSG inside MC_*, not your subnet NSG. An internal LB also needs the client's network range allowed. B: The cloud-controller-manager uses the cluster identity to create and update the LB and public IPs. That identity lacks Network Contributor on the BYO VNet or subnet, or on the resource group holding the public IP, or the public IP quota (PublicIPCountLimitReached) is exhausted.
Diagnostic commands
kubectl describe svc myapp -n lab8-m2 | sed -n '/Events/,$p'
az network vnet subnet show -g $RG --vnet-name vnet-aks-lab -n snet-nodes --query networkSecurityGroup.id -o tsv
az network nsg rule list -g $RG --nsg-name nsg-aks-nodes -o table
az network watcher test-ip-flow --direction Inbound --protocol TCP --local 10.10.0.4:80 --remote 203.0.113.50:50000 --vm <vmss instance ID> # Optional
Fix
A: Add an inbound allow rule to the subnet NSG (destination port = the Service port; source = client, Internet, or the AzureLoadBalancer health probes).
B: Grant the cluster identity Network Contributor on the VNet (or subnet). If you use a pre-created public IP, you also need permissions on the resource group that holds that IP.
Prevention and best practices
Review the NSG rules of BYO VNet clusters together with the Service manifests. Production entry should go through an ingress controller or gateway, not one LB per service.
#25 Ingress returns 502 Bad Gateway / 404 (AGIC, application routing NGINX); migration risk after Ingress-NGINX retirement
$ curl -I https://myapp.example.com
HTTP/1.1 502 Bad Gateway
Server: Microsoft-Azure-Application-Gateway/v2 ← AGIC
(or) Server: nginx … 404 Not Found ← application routing add-on NGINX, Host does not match
Symptom: The Pods are Ready and the Service is healthy, but access through the ingress fails.
Root cause: AGIC: Application Gateway's backend health probe fails (the default probe path is /, but myapp only returns 200 on /healthz), the backend pool is not synced (the AGIC Pod lacks permission to update the gateway), or the AGW subnet NSG or UDR does not meet requirements. NGINX: the Ingress's ingressClassName is wrong (it should be webapprouting.kubernetes.azure.com for the application routing add-on), the Host or path does not match, or the certificate Secret does not exist. Lifecycle risk: the upstream Ingress NGINX project ended maintenance in 2026-03. Microsoft provides only critical security patches for the NGINX in the application routing add-on, until 2026-11. You need to migrate to a Gateway API implementation in application routing, or to Application Gateway for Containers.
Health probe: configure a readinessProbe on the Pod (AGIC generates the probe from it), or use the annotation appgw.ingress.kubernetes.io/health-probe-path: /healthz.
NGINX: correct the ingressClassName and Host, and use kubectl get events to see the controller's sync events.
Migration: follow Microsoft's “Migrate from application routing NGINX to Gateway API” doc to make a plan. Run Gateway/HTTPRoute alongside Ingress, and switch domain by domain.
Prevention and best practices
Use Gateway API directly for new services. The platform should take inventory of Ingress-NGINX annotation usage, since many annotations have no one-to-one equivalent in Gateway API.
Answer step by step from the symptom. The end gives a conclusion and the matching problem number. Each branch corresponds to a scenario in the Microsoft troubleshooting docs.
Environment and cost This module creates a temporary cluster aks-lab-net (1 × Standard_D2s_v5, Free tier, BYO VNet vnet-aks-lab, Azure CNI Overlay + Cilium), about US$0.2 per hour (example estimate). Delete it as soon as the module ends. Lab 2-A fails in the ARM validation stage and incurs no cost. Required roles: Contributor on the resource group, plus User Access Administrator (the cluster identity needs subnet permissions). Security risk: 2-B temporarily restricts the API server to an IP that is not yours. Be sure to restore it by following the steps.
Lab 2-A: CIDR conflict and DNS IP out of range (#13, #14)
RG=rg-aks-lab; LOC=canadacentral
az network vnet create -g $RG -n vnet-aks-lab --address-prefixes 10.10.0.0/16 --subnet-name snet-nodes --subnet-prefixes 10.10.0.0/22
SUBNET=$(az network vnet subnet show -g $RG --vnet-name vnet-aks-lab -n snet-nodes --query id -o tsv)
# Deliberately make the Service CIDR overlap the VNet
az aks create -g $RG -n aks-lab-net --vnet-subnet-id $SUBNET --network-plugin azure --network-plugin-mode overlay \
--pod-cidr 192.168.0.0/16 --service-cidr 10.10.0.0/16 --dns-service-ip 10.10.0.10 --node-count 1 --node-vm-size Standard_D2s_v5 --generate-ssh-keys
(ServiceCidrOverlapExistingSubnetsCidr) The specified service CIDR 10.10.0.0/16 is conflicted with an existing subnet CIDR 10.10.0.0/22
Code: ServiceCidrOverlapExistingSubnetsCidr
# Changed the Service CIDR, but the DNS IP is still the default value
az aks create -g $RG -n aks-lab-net --vnet-subnet-id $SUBNET --network-plugin azure --network-plugin-mode overlay \
--pod-cidr 192.168.0.0/16 --service-cidr 10.0.0.0/16 --dns-service-ip 10.1.0.10 --node-count 1 --node-vm-size Standard_D2s_v5 --generate-ssh-keys
(DnsServiceIpOutOfServiceCidr) The DNS service IP 10.1.0.10 is out of the range defined by service CIDR 10.0.0.0/16.
Create it with the correct parameters agreed for this course (used in later labs):
az aks create -g $RG -n aks-lab-net --vnet-subnet-id $SUBNET --network-plugin azure --network-plugin-mode overlay --network-dataplane cilium \
--pod-cidr 192.168.0.0/16 --service-cidr 10.0.0.0/16 --dns-service-ip 10.0.0.10 --node-count 1 --node-vm-size Standard_D2s_v5 --tier free --generate-ssh-keys
az aks get-credentials -g $RG -n aks-lab-net --overwrite-existing
When you use a BYO subnet, the CLI prompts for, or attempts to assign, subnet permissions to the cluster identity. If you lack User Access Administrator, an administrator must grant Network Contributor beforehand. Otherwise you get the B-type problem of #24.
Lab 2-B: an authorized IP range locks yourself out (#18)
az aks update -g $RG -n aks-lab-net --api-server-authorized-ip-ranges 203.0.113.10/32
kubectl get nodes --request-timeout=15s
Unable to connect to the server: dial tcp 20.x.x.x:443: i/o timeout
Verify through a path that does not depend on the network, then restore:
az aks command invoke -g $RG -n aks-lab-net --command "kubectl get nodes"
MYIP=$(curl -s https://ifconfig.me)
az aks update -g $RG -n aks-lab-net --api-server-authorized-ip-ranges "$MYIP/32"
kubectl get nodes
Lab 2-C: default-deny egress network policy causes DNS timeouts (#23)
az aks delete -g $RG -n aks-lab-net --yes --no-wait
# After the cluster deletion completes, remove the NSG association and delete the NSG. Leave the subnet and VNet for later courses, or delete them together.
az network vnet subnet update -g $RG --vnet-name vnet-aks-lab -n snet-nodes --remove networkSecurityGroup
az network nsg delete -g $RG -n nsg-aks-nodes
az aks get-credentials -g $RG -n aks-lab --overwrite-existing # Switch back to aks-lab
Video lessons (titles and channels verified with YouTube oEmbed)
Tell apart the four kinds of identity in AKS: the control plane identity (manages Azure resources such as LBs, disks, and DNS zones), the kubelet identity (pulls ACR images and mounts), the Entra identity of people and pipelines (accesses the API server), and the workload identity (Pods accessing Key Vault and storage). For every denial, first ask which kind of identity it is and at which layer it was denied.
Classify errors as authentication (401, AADSTS…), authorization (403, Forbidden), or network (i/o timeout).
Know the sources of admission-layer denials: the Azure Policy add-on (Gatekeeper), Deployment Safeguards (Warn or Enforce), Pod Security Admission, and RequestDisallowedByPolicy at the ARM layer.
Type a keyword (such as 401, Forbidden, AADSTS, local accounts, SecretProviderClass, policy) to filter. Click a row to jump to its details.
#26 ImagePullBackOff: failed to authorize: failed to fetch oauth token: unexpected status: 401 Unauthorized (ACR)
Failed to pull image "<acrname>.azurecr.io/<repository:tag>": [rpc error: code = Unknown desc = failed to pull and unpack image "<acrname>.azurecr.io/<repository:tag>": failed to resolve reference "<acrname>.azurecr.io/<repository:tag>": failed to authorize: failed to fetch oauth token: unexpected status: 401 Unauthorized
Symptom: ImagePullBackOff on the first deployment to a new cluster or a new ACR. Or, after someone “cleaned up role assignments”, pulls fail on newly scheduled nodes. Nodes that already have the image cached are not affected.
Root cause: On the node, containerd gets a token from ACR through the kubelet credential provider, using the kubelet managed identity (not the control plane identity, and not your identity). That identity has no AcrPull on ACR. (A registry with ABAC enabled needs Container Registry Repository Reader.) Or the kubelet identity was removed from the VMSS. Or the image name is misspelled. AKS always tries an anonymous pull first, and a wrong name can also appear as 401. Or, for a service principal cluster, the SP has expired (#35).
Diagnostic commands
az aks check-acr -g $RG -n $CLUSTER --acr $ACR.azurecr.io
KUBELET_ID=$(az aks show -g $RG -n $CLUSTER --query identityProfile.kubeletidentity.objectId -o tsv)
az role assignment list --assignee $KUBELET_ID --scope $(az acr show -n $ACR --query id -o tsv) -o table
kubectl describe pod -n lab8-m3 -l app=myapp | sed -n '/Events/,$p'
az aks update -g $RG -n $CLUSTER --attach-acr $ACR # Assign AcrPull to the kubelet identity
az aks check-acr -g $RG -n $CLUSTER --acr $ACR.azurecr.io
kubectl rollout restart deploy/myapp -n lab8-m3
Role assignments can take a few minutes to take effect. The Microsoft docs also mention a node credential caching issue, where correct authorization still returns 401. Wait, or rebuild the node.
Prevention and best practices
In IaC, put “kubelet identity → AcrPull” in the same module as the cluster, to avoid a manual attach.
Don't use the ACR admin account with imagePullSecret in production.
… failed to authorize: failed to fetch anonymous token: unexpected status: 403 Forbidden
… failed to do request: Head "https://<acrname>.azurecr.io/v2/<repository>/manifests/v1": dial tcp <acrprivateipaddress>:443: i/o timeout
Symptom: Pulls fail after ACR turns off public access or configures an IP allow list. The check-acr identity check passes, but the network check fails.
Root cause:403: The request reached ACR, but its source is not allowed. Either the node's outbound public IP (LB or NAT Gateway) is not on the ACR firewall allow list, or ACR allows only private endpoints and the node VNet is not linked to the privatelink.azurecr.io private DNS zone. In that case it resolves to the public IP and is rejected. i/o timeout: It resolves to the private endpoint IP, but there is no route, because the private endpoint is in a VNet that is not peered. Don't forget that ACR also has data endpoints (<acr>.<region>.data.azurecr.io, when dedicated data endpoints are enabled), which must also resolve and be reachable.
Diagnostic commands
az acr show -n $ACR --query "{public:publicNetworkAccess,rules:networkRuleSet.ipRules,dataEp:dataEndpointEnabled}" -o json
az network private-dns link vnet list -g <dnsRG> -z privatelink.azurecr.io -o table
kubectl run -it --rm nettest --image=mcr.microsoft.com/azurelinux/busybox:1.36 --restart=Never -- nslookup $ACR.azurecr.io
Fix
Private endpoint approach: link the privatelink.azurecr.io zone to the AKS VNet (or to the hub, with forwarding configured), and make sure the VNets are peered.
IP allow list approach: add the cluster's outbound IP (LB outbound IP or NAT Gateway public IP) to the ACR network rules.
Prevention and best practices
Design ACR together with the AKS network approach. Only the Premium SKU supports private endpoints and dedicated data endpoints.
A change in outbound IP (for example, switching from LB to NAT Gateway) is a common cause of 403. List the ACR allow-list update in the change request.
#28 no match for platform in manifest: not found / exec format error (image architecture does not match the node)
Failed to pull image "<acrname>.azurecr.io/<repository:tag>": [rpc error: code = NotFound desc = failed to pull and unpack image …: no match for platform in manifest: not found, … failed to fetch anonymous token: … 401 Unauthorized]
(When the image pulls but the architecture is wrong, the container log shows) exec /usr/local/bin/gunicorn: exec format error
Symptom: On an Apple Silicon laptop, after docker build and push, the pull fails on AMD64 nodes. Or, after adding an Arm64 node pool (Dpsv6, for example), some Pods scheduled to Arm nodes fail to start.
Root cause: The image has a manifest for only one architecture. A node looks for a manifest matching its own architecture. If none is found, it reports no match. Sometimes this comes with a misleading 401 (see Cause 1b in the docs).
# Build a multi-architecture image
docker buildx build --platform linux/amd64,linux/arm64 -t $ACR.azurecr.io/myapp:1.1 --push .
# Or build in ACR: az acr build -r $ACR -t myapp:1.1 --platform linux/amd64 .
# Or constrain scheduling: nodeSelector: { kubernetes.io/arch: amd64 }
Prevention and best practices
Build in CI in a uniform way, and don't push production images from developer laptops. Clusters with mixed architectures must use multi-architecture images.
#29 Error from server (Forbidden): nodes is forbidden: User "…" cannot list resource "nodes" in API group "" at the cluster scope
$ kubectl get nodes
Error from server (Forbidden): nodes is forbidden: User "aaaa11111-11aa-aa11-a1a1-111111aaaaa" cannot list resource "nodes" in API group "" at the cluster scope
Symptom: Login works (authentication succeeds), but no resources are visible. Permissions exist only in some namespaces. Or access suddenly disappears after group membership changes.
Root cause: Authentication has passed (the user shows up as an Entra object ID), but authorization fails. With Azure RBAC for Kubernetes enabled, permissions come from Azure role assignments (Azure Kubernetes Service RBAC Reader/Writer/Admin/Cluster Admin, scoped to the cluster or to …/namespaces/<ns>). With Kubernetes RBAC, they come from the Entra group object IDs bound through RoleBinding or ClusterRoleBinding. Note that Azure Kubernetes Service Cluster User Role only allows downloading the kubeconfig and grants no Kubernetes data plane permissions at all. If a user belongs to too many groups (beyond the token group claim limit), group information may be missing from the token.
Diagnostic commands
az aks show -g $RG -n $CLUSTER --query "aadProfile.{azureRbac:enableAzureRbac,admins:adminGroupObjectIDs}" -o json
kubectl auth can-i list nodes
kubectl auth whoami # Shows the current user and groups
AKS_ID=$(az aks show -g $RG -n $CLUSTER --query id -o tsv)
az role assignment list --scope $AKS_ID --include-inherited -o table
Fix
az role assignment create --assignee <user-or-group-objectId> --role "Azure Kubernetes Service RBAC Reader" --scope $AKS_ID/namespaces/lab8-m3
# For cluster-level read-only access, scope to $AKS_ID. Nodes are cluster-level resources.
Prevention and best practices
Grant access to groups only, not to individuals. Namespace-level grants can be a team self-service model (Hour 5, platform engineering).
Azure RBAC role assignments take a few minutes to propagate. Add retries in automation.
#30 Unable to connect to the server: dial tcp [::1]:8080 … / You must be logged in to the server (kubeconfig missing or kubelogin not converted)
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
error: You must be logged in to the server (the server has asked for the client to provide credentials)
Symptom: A new CI runner or a new colleague runs kubectl and it fails. Or kubectl gets stuck at a device-code login, so the pipeline never gets the input. Or it reports exec: executable kubelogin not found (the exact wording may vary).
Root cause: The first message means there is no kubeconfig, so kubectl falls back to localhost:8080. The second means the kubeconfig exists but its credentials are invalid or expired. Or, for a cluster integrated with Entra, the kubeconfig uses the kubelogin exec plugin, and kubelogin is either not installed or has no sign-in mode suitable for non-interactive environments.
az aks install-cli # Installs kubectl and kubelogin
az aks get-credentials -g $RG -n $CLUSTER --overwrite-existing
kubelogin convert-kubeconfig -l azurecli # Reuses the identity from az login (common in CI)
# Pipelines that sign in with Workload Identity federation: kubelogin convert-kubeconfig -l workloadidentity
Prevention and best practices
Fix the CI template: az login (OIDC federated credential) → get-credentials → kubelogin convert-kubeconfig -l azurecli.
Don't use --admin credentials in pipelines (see #31).
#31 Getting static credential isn't allowed because this cluster is set to disable local accounts.
Operation failed with status: 'Bad Request'. Details: Getting static credential isn't allowed because this cluster is set to disable local accounts.
Symptom: An operations runbook or an old script runs az aks get-credentials --admin, and it fails. A third-party tool that depends on clusterAdmin certificates can no longer connect.
Root cause: The cluster has --disable-local-accounts enabled. Local clusterAdmin and clusterUser certificate credentials are disabled, so all access must go through Entra authentication, which makes it auditable and revocable. This is the intended security behavior, not a fault.
Diagnostic commands
az aks show -g $RG -n $CLUSTER --query "{disableLocal:disableLocalAccounts,aad:aadProfile.managed}" -o table
Fix
az aks get-credentials -g $RG -n $CLUSTER --overwrite-existing # Without --admin
kubelogin convert-kubeconfig -l azurecli
# Emergency access (break-glass): use a pre-configured Entra admin group protected by PIM, not re-enabled local accounts
If you really need it, you can run az aks update --enable-local-accounts. After enabling, rotate the certificates (az aks rotate-certs) so the old credentials become invalid. The change requires approval.
Prevention and best practices
Disable local accounts on all production clusters (Azure Policy can audit or deny this). Use a PIM group for the break-glass process, and rehearse it regularly.
#32 AADSTS700213: No matching federated identity record found for presented assertion subject 'system:serviceaccount:myapp:myapp-sa'
AADSTS700213: No matching federated identity record found for presented assertion subject 'system:serviceaccount:myapp:myapp-sa'. Check your federated identity credential Subject, Audience and Issuer against the presented assertion.
Symptom: The Azure SDK in a Pod (DefaultAzureCredential or WorkloadIdentityCredential) fails to get a token. The same app works in another namespace or another cluster.
Root cause: The Workload Identity exchange works like this. The service account token projected by the kubelet (issuer = the cluster's OIDC issuer URL, subject = system:serviceaccount:<ns>:<sa>, audience = api://AzureADTokenExchange) is sent to Entra. Entra then looks for a record in the managed identity's federated credentials that matches the issuer, subject, and audience exactly. If the namespace or SA name changed, the cluster was rebuilt (so the issuer URL changed), or the issuer was pasted without its trailing /, there will be a mismatch.
Diagnostic commands
az aks show -g $RG -n $CLUSTER --query oidcIssuerProfile.issuerUrl -o tsv
az identity federated-credential list -g $RG --identity-name id-myapp --query "[].{name:name,issuer:issuer,subject:subject,aud:audiences[0]}" -o table
kubectl get sa -n myapp myapp-sa -o jsonpath='{.metadata.annotations}'; echo
After a federated credential is created, it usually takes from tens of seconds to a few minutes to take effect.
Prevention and best practices
In IaC, compute the federated credentials from the cluster's output issuer URL and the SA name fixed in the chart, instead of typing them by hand.
When rebuilding a cluster blue/green, first add the federated credential for the new cluster (one identity can have several), then delete the old one after switching.
#33 Workload Identity not injected: no AZURE_FEDERATED_TOKEN_FILE in the Pod, so the SDK falls back to managed identity/IMDS and fails
DefaultAzureCredential failed to retrieve a token from the included credentials.
- WorkloadIdentityCredential: … workload identity … not configured / environment variables are missing
- ManagedIdentityCredential authentication failed …
$ kubectl exec -n myapp deploy/myapp -- env | grep AZURE_ ← output is empty
Symptom: The federated credential is configured correctly (unlike #32, Entra never receives the exchange request at all), and there is no projected token file in the Pod.
Root cause: The Workload Identity mutating webhook only processes labeledazure.workload.identity/use: "true"Pods. The label goes on the Pod template, not on the SA. The SA needs the annotation azure.workload.identity/client-id. Other possible causes: the cluster was not created with --enable-workload-identity/--enable-oidc-issuer; the Pod was created before the webhook was ready; or the Pod uses a different SA.
Diagnostic commands
az aks show -g $RG -n $CLUSTER --query "{oidc:oidcIssuerProfile.enabled,wi:securityProfile.workloadIdentity.enabled}" -o table
kubectl get pod -n myapp -l app=myapp -o jsonpath='{.items[0].metadata.labels}{"\n"}{.items[0].spec.serviceAccountName}{"\n"}'
kubectl get mutatingwebhookconfiguration | grep -i workload
Fix
apiVersion: v1
kind: ServiceAccount
metadata:
name: myapp-sa
namespace: myapp
annotations: { azure.workload.identity/client-id: "<clientId of id-myapp>" }
---
# Pod template of the Deployment
spec:
template:
metadata:
labels: { app: myapp, azure.workload.identity/use: "true" }
spec:
serviceAccountName: myapp-sa
After you change these, you must recreate the Pods. The webhook injects AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_FEDERATED_TOKEN_FILE, AZURE_AUTHORITY_HOST, and the token volume only when the Pod is created.
Prevention and best practices
In the Helm chart, put the label and the SA annotation behind a single values switch. Use Azure Policy to audit workloads that use Key Vault but lack the label.
AAD Pod Identity is deprecated and archived. Migrate existing workloads to Workload Identity.
#34 MountVolume.SetUp failed for volume "secrets-store-inline" … SecretProviderClass … not found / Identity not found (Key Vault CSI)
Warning FailedMount 2s (x5 over 10s) kubelet MountVolume.SetUp failed for volume "xxxxxxx" : rpc error: code = Unknown desc = failed to get secretproviderclass xxxxxxx/xxxxxxx, error: SecretProviderClass.secrets-store.csi.x-k8s.io "xxxxxxxxxxxxx" not found
MountVolume.SetUp failed for volume "<volume-name>" : … StatusCode=400 -- Original Error: adal: Refresh request failed. Status Code = '400'. Response body: {"error":"invalid_request","error_description":"Identity not found"} …
Symptom: The Pod is stuck in ContainerCreating, and the events show FailedMount.
Root cause: The CSI driver mounts the volume when the Pod starts. It first reads the SecretProviderClass in the same namespace (a wrong name or namespace → not found). It then uses the identity configured in that object to access Key Vault (a wrong userAssignedIdentityID → Identity not found; with Workload Identity, use clientID plus the Pod's SA). Finally, the network must reach Key Vault (a private endpoint on a different network → GetSecret timeout), and the identity needs Key Vault permissions (RBAC Key Vault Secrets User or an access policy; otherwise 403).
Diagnostic commands
kubectl get secretproviderclass -n lab8-m3
kubectl describe pod -n lab8-m3 <pod> | sed -n '/Events/,$p'
kubectl logs -n kube-system -l app=secrets-store-provider-azure --tail=30
az aks show -g $RG -n $CLUSTER --query "addonProfiles.azureKeyvaultSecretsProvider.enabled"
Fix
Name: the Pod volume's secretProviderClass must match the object name and be in the same namespace.
Identity: with Workload Identity, set clientID in the SecretProviderClass and have the Pod use the matching SA. Assign Key Vault Secrets User to that identity.
Network: link the privatelink.vaultcore.azure.net zone to the AKS VNet for the Key Vault private endpoint.
Prevention and best practices
When secret rotation is enabled (--enable-secret-rotation), note that values synced to a K8s Secret are created or updated only after the Pod mounts the volume. The application must be able to re-read the file.
#35 BadRequest: The credentials in ServicePrincipalProfile were invalid … AADSTS7000222: The provided client secret keys for app … are expired
BadRequest: The credentials in ServicePrincipalProfile were invalid. Please see https://aka.ms/aks-sp-help for more details. (Details: adal: Refresh request failed. Status Code = '401'. Response body: {"error": "invalid_client", "error_description": "AADSTS7000222: The provided client secret keys for app '<application-id>' are expired. …"
Symptom: On an old cluster created years ago with a service principal, upgrades or scale-outs fail, a new LoadBalancer Service stays pending, and new nodes cannot pull images from ACR.
Root cause: A service principal cluster uses the secret of this SP for both the control plane and the kubelet. The secret has a limited validity period by default. Once it expires, every operation that calls Azure APIs fails. Running Pods are not affected, so the problem is often found only at upgrade time.
Diagnostic commands
SP_ID=$(az aks show -g $RG -n $CLUSTER --query servicePrincipalProfile.clientId -o tsv); echo $SP_ID # "msi" means a managed identity
az ad app credential list --id $SP_ID --query "[].{end:endDateTime,hint:hint}" -o table
Fix
# Root fix: migrate to managed identity (recommended)
az aks update -g $RG -n $CLUSTER --enable-managed-identity
# Temporary: reset the secret and update it on the cluster
SECRET=$(az ad app credential reset --id $SP_ID --query password -o tsv)
az aks update-credentials -g $RG -n $CLUSTER --reset-service-principal --service-principal $SP_ID --client-secret "$SECRET"
After you migrate to managed identity, the kubelet identity changes, so you must grant AcrPull and other permissions again (--attach-acr). Nodes must be upgraded or reimaged before they use the new identity. Follow the documented steps, and schedule a maintenance window.
Prevention and best practices
Use only managed identities for new clusters. Add existing SP clusters to the migration list, and set alerts for secret expiry.
#36 RequestDisallowedByPolicy: Resource 'MC_clustername' was disallowed by policy.
Resource request failed due to RequestDisallowedByPolicy. Please see https://aka.ms/aks-requestdisallowedbypolicy for more details. The detailed error message: Code="RequestDisallowedByPolicy"
Message="Resource 'MC_clustername' was disallowed by policy.
Symptom: Creating or upgrading a cluster in an enterprise landing zone fails. The rejected resource is often not the cluster itself, but the resources AKS creates on your behalf: the node resource group MC_* (which does not meet the naming or tagging policy), public IPs (a 'no public IP' policy), VMSS extensions, and diagnostic settings.
Root cause: Azure Policy rejects the request at the ARM layer with a deny effect. Child resources created by the AKS RP are subject to the same policies, and you do not control their names or tags directly.
Diagnostic commands
az monitor activity-log list -g $RG --offset 1h --query "[?contains(properties.statusCode,'Disallowed') || contains(to_string(properties),'RequestDisallowedByPolicy')].properties.statusMessage" -o tsv | head -c 2000
az policy assignment list --disable-scope-strict-match --query "[].{name:displayName,scope:scope,enforce:enforcementMode}" -o table
Fix
Use the policyAssignmentId from the error details to find the policy. Add an exemption for the AKS managed resources, or change the conditions (for example, allow MC_* naming, or allow the AKS managed tags).
Use --node-resource-group to set a custom node resource group name that meets the naming policy. You can set it only at creation time.
Prevention and best practices
The platform team maintains a list of the policy exemptions AKS needs, and trials new policies in audit mode before they are enforced.
Error from server (Forbidden): error when creating "deploy.yaml": admission webhook "validation.gatekeeper.sh" denied the request: [azurepolicy-k8sazurev2containerallowedimages-…] Container image docker.io/library/nginx:latest for container nginx has not been allowed.
(When Safeguards are set to Warn) Warning: [azurepolicy-…] … resource requests/limits … — the object is still created
Symptom: A kubectl or Helm deployment is rejected. Or, on AKS Automatic, a deployment runs but shows many warnings, and then the same deployment is rejected on another cluster.
Root cause: The Azure Policy add-on syncs policies into Gatekeeper constraints, which are checked at admission time (allowed image registries, no privileged containers, required resource limits, and so on). Deployment Safeguards are a set of built-in best-practice policies that AKS provides. Their level is Warn or Enforce (preconfigured on AKS Automatic). After a policy is assigned, there is a sync delay before Gatekeeper enforces it. Excluded namespaces are not affected.
Diagnostic commands
kubectl get constrainttemplates
kubectl get constraints -o custom-columns=KIND:.kind,NAME:.metadata.name,ACTION:.spec.enforcementAction,VIOLATIONS:.status.totalViolations
az aks show -g $RG -n $CLUSTER --query "addonProfiles.azurepolicy.enabled"
az aks safeguards show -g $RG -n $CLUSTER # Deployment Safeguards configuration (check az aks safeguards --help for the exact command)
Fix
First choice: change the workload so it complies (switch the image to ACR, set requests/limits, remove privileged).
If you really need an exception: exclude the namespace in the policy assignment, or configure excluded namespaces in Safeguards. The name must be a valid Kubernetes namespace name.
Prevention and best practices
In CI, use kubectl apply --dry-run=server or gator to find violations before merging. Roll out new policies in Warn or audit mode first.
#38 The portal shows the cluster complies with a custom policy, but the upgrade is blocked by the same custom policy
You see a message in the Azure portal that indicates that your AKS cluster is compliant with your Azure custom policy. However, when you try to upgrade AKS, the custom policy blocks the upgrade attempt.
Symptom: The compliance report is all green, but the upgrade fails. Or, partway through the upgrade, the newly created surge node or system components are rejected by policy.
Root cause: During an upgrade, AKS creates or changes objects and fields that do not exist when compliance is scanned (a new VMSS model, extension versions, temporary resources, and new specs for system Pods). The conditions of the custom policy do not hold for these requests, which appear only during upgrades. Microsoft's documentation notes that the policies applied during an upgrade can differ from those on the running cluster, which can happen when you upgrade with the Azure CLI.
Diagnostic commands
az monitor activity-log list -g $RG --offset 2h --status Failed --query "[].{op:operationName.value,msg:properties.statusMessage}" -o json | grep -i -m5 policy
kubectl get events -n kube-system --field-selector reason=FailedCreate | tail
Fix
The fix documented by Microsoft is to upgrade from the Azure portal instead. The more fundamental fix is to change the custom policy so that it excludes AKS-managed resources and system namespaces (kube-system, gatekeeper-system, and so on).
If the upgrade fails, fix the policy and retry (#12).
Prevention and best practices
Run a full control plane and node pool upgrade on a pre-production cluster as an acceptance test for the custom policy.
Start from the symptom you see and choose step by step. You will reach a conclusion and the matching problem number.
Environment and cost The lab uses aks-lab (about US$0.5 per hour) and the course ACR. The lab creates and deletes role assignments, a federated credential, and the managed identity id-myapp, which requires User Access Administrator on the resource group. Security risk: Lab 3-A temporarily removes the AcrPull role from the kubelet identity, so run it only on the lab cluster.
Lab 3-A: remove AcrPull to reproduce the 401 (#26)
RG=rg-aks-lab; CLUSTER=aks-lab; ACR=$(az acr list -g $RG --query "[0].name" -o tsv)
az aks update -g $RG -n $CLUSTER --detach-acr $ACR
kubectl create ns lab8-m3
kubectl -n lab8-m3 create deployment myapp --image=$ACR.azurecr.io/myapp:1.1
sleep 60; kubectl -n lab8-m3 get pods; kubectl -n lab8-m3 describe pod -l app=myapp | grep -m1 "Failed to pull"
myapp-6f9c… 0/1 ErrImagePull 0 55s
Warning Failed … Failed to pull image "acraks21837.azurecr.io/myapp:1.1": … failed to authorize: failed to fetch oauth token: unexpected status: 401 Unauthorized
If the node has already cached the image (pulled before), you will not see the error. Use a new tag, for example by first running az acr import to import a myapp:lab8.
az aks check-acr -g $RG -n $CLUSTER --acr $ACR.azurecr.io | tail -3
az aks update -g $RG -n $CLUSTER --attach-acr $ACR
kubectl -n lab8-m3 rollout restart deploy/myapp && kubectl -n lab8-m3 rollout status deploy/myapp --timeout=180s
Lab 3-B: wrong federated credential subject (#32)
az identity create -g $RG -n id-myapp
CLIENT_ID=$(az identity show -g $RG -n id-myapp --query clientId -o tsv)
ISSUER=$(az aks show -g $RG -n $CLUSTER --query oidcIssuerProfile.issuerUrl -o tsv)
# Deliberately set to the default namespace
az identity federated-credential create -g $RG --identity-name id-myapp --name fic-wrong --issuer "$ISSUER" \
--subject system:serviceaccount:default:myapp-sa --audiences api://AzureADTokenExchange
kubectl -n lab8-m3 create sa myapp-sa
kubectl -n lab8-m3 annotate sa myapp-sa azure.workload.identity/client-id=$CLIENT_ID
kubectl -n lab8-m3 run azcli --image=mcr.microsoft.com/azure-cli:latest --overrides='{"metadata":{"labels":{"azure.workload.identity/use":"true"}},"spec":{"serviceAccountName":"myapp-sa"}}' --command -- sleep 3600
kubectl -n lab8-m3 wait --for=condition=Ready pod/azcli --timeout=180s
kubectl -n lab8-m3 exec azcli -- sh -c 'az login --federated-token "$(cat $AZURE_FEDERATED_TOKEN_FILE)" --service-principal -u $AZURE_CLIENT_ID -t $AZURE_TENANT_ID --allow-no-subscriptions'
AADSTS700213: No matching federated identity record found for presented assertion subject 'system:serviceaccount:lab8-m3:myapp-sa'. …
The lab uses mcr.microsoft.com/azure-cli:latest for easy demonstration. Pin a fixed version for production images.
Fix: create the credential with the correct subject, wait about 1 minute, then retry:
Lab 3-C: --admin fails after local accounts are disabled (#31)
az aks update -g $RG -n $CLUSTER --disable-local-accounts
az aks get-credentials -g $RG -n $CLUSTER --admin -f /tmp/admin.kubeconfig
(BadRequest) Getting static credential isn't allowed because this cluster is set to disable local accounts.
az aks get-credentials -g $RG -n $CLUSTER --overwrite-existing && kubelogin convert-kubeconfig -l azurecli
kubectl auth whoami
Keep local accounts disabled (the course's recommended security baseline). If a lab in Hour 3 depends on admin credentials, use Entra credentials instead.
No verified video specifically covering Key Vault CSI mount failures or Deployment Safeguards troubleshooting was found. Below is a shot-by-shot storyboard:
Shot 1 (0:00) Deploy a Pod that references a wrong SecretProviderClass; kubectl describe highlights FailedMount. Shot 2 (0:50) After the name is corrected, a 403 appears: show that Key Vault IAM is missing Key Vault Secrets User. Shot 3 (1:40) After access is granted, the mount succeeds; ls /mnt/kv. Shot 4 (2:20) Turn on Safeguards at Warn and deploy a Pod without limits to show the warning; switch to Enforce, and the deployment is rejected.
Module 4 · Part A: Scaling, storage, cost, and operations (questions 39–50)
24:00 – 30:00 · Cluster Autoscaler and NAP decisions, scheduling failures, KEDA, Azure Disk/Files, Terminating, throttling, monitoring workspaces, cost analysis
6 minutesCA · NAP (Karpenter) · CSI12 questions
Learning goals
Explain the two scale-out paths for a Pending Pod. Cluster Autoscaler runs a simulated schedule against the existing node pools and scales out only if a new node can fit the Pod. NAP chooses a VM size based on the Pod's needs and creates a single VM (NodeClaim).
Split storage failures into three layers: scheduling (volume topology or zone) → mounting (Attach/Mount, permissions, network) → deletion (finalizers).
Know the non-technical root causes of operational failures: subscription API throttling, a deleted Log Analytics workspace, and a pricing tier that does not meet an add-on's requirements.
Enter a keyword (such as scale-up, autoscaler, Insufficient, Multi-Attach, Terminating, or 429) to filter. Click a row to jump to its details.
#39 pod didn't trigger scale-up (it wouldn't fit if a new node is added); Failed to fix node group sizes
(kubectl describe pod events) pod didn't trigger scale-up (it wouldn't fit if a new node is added)
(cluster-autoscaler log) E1114 09:58:55.367731 1 static_autoscaler.go:239] Failed to fix node group sizes: failed to decrease aks-default-35246781-vmss: attempt to delete existing nodes
Symptom: A Pod stays Pending for a long time. CA is enabled, but the node count does not change, or the node pool has already reached maxCount.
Root cause: For each node pool, CA simulates scheduling using a node template: would the Pod fit if one more node were added to that pool? The following cases all result in 'does not fit'. The Pod's requests are larger than the allocatable resources of a single node (the VM is too small). The nodeSelector, affinity, or tolerations match only a pool that cannot scale. The PVC is bound to a zone where that pool has no capacity. The pool has reached maxCount. 'Failed to fix node group sizes' means that the node count CA expects does not match the actual VMSS instance count (for example, someone changed the instance count on the VMSS by hand).
Diagnostic commands
kubectl get events -A --field-selector source=cluster-autoscaler,reason=NotTriggerScaleUp
kubectl get configmap -n kube-system cluster-autoscaler-status -o yaml | sed -n '/status:/,$p' | head -40
kubectl describe node | grep -A6 "Allocatable"
az aks nodepool list -g $RG --cluster-name $CLUSTER --query "[].{n:name,auto:enableAutoScaling,min:minCount,max:maxCount,cnt:count,vm:vmSize}" -o table
NAMESPACE REASON MESSAGE
lab8-m4 NotTriggerScaleUp pod didn't trigger scale-up: 1 Insufficient memory, 1 max node group size reached
Fix
Requests too large: adjust the requests, or add a node pool with a larger VM size (CA chooses among pools based on the expander).
maxCount: az aks nodepool update --update-cluster-autoscaler --min-count 1 --max-count 6 (also check the quota in #1 and the subnet in #10).
Node group sizes are inconsistent: do not change the VMSS by hand. Reconcile the node pool as described in #12.
Prevention and best practices
For each node pool, record the maximum number of Pods it can schedule (allocatable resources minus DaemonSet overhead). Use an admission policy to limit requests above that.
Send CA logs to diagnostic settings (the cluster-autoscaler category), and set an alert for NotTriggerScaleUp.
#40 Cannot scale cluster autoscaler enabled node pool (a manual scale is rejected / all Pods are Pending after the VMSS is deleted)
`kubectl get nodes` outputs "No resources found"
All pods state is `Pending`
Scale operations fail with "Cannot scale cluster autoscaler enabled node pool" error
Symptom A (most common): The on-call engineer wants to add nodes temporarily and runs az aks nodepool scale, which is rejected. Symptom B (documented scenario): Someone deleted the VMSS in MC_*. All nodes disappeared, and CA cannot scale out either.
Root cause: A: on a node pool with CA enabled, CA manages the node count. A manual count setting would conflict with it, so the RP rejects it. Adjust min and max instead. B: changing resources directly in the node resource group is an unsupported operation. After the VMSS is deleted, CA has no scalable object.
Diagnostic commands
az aks nodepool show -g $RG --cluster-name $CLUSTER -n nodepool1 --query "{auto:enableAutoScaling,min:minCount,max:maxCount,count:count}" -o table
az vmss list -g $(az aks show -g $RG -n $CLUSTER --query nodeResourceGroup -o tsv) -o table
Fix
# A: adjust the CA range (to keep at least 4 nodes → min-count 4)
az aks nodepool update -g $RG --cluster-name $CLUSTER -n nodepool1 --update-cluster-autoscaler --min-count 4 --max-count 8
# Or temporarily turn off CA and scale manually (remember to re-enable it afterward)
az aks nodepool update -g $RG --cluster-name $CLUSTER -n nodepool1 --disable-cluster-autoscaler
# B: reconcile the node pool (the method given in the documentation)
az aks nodepool update -g $RG --cluster-name $CLUSTER -n nodepool1
Prevention and best practices
In the operations runbook, state that for a pool with CA enabled, you change only min and max.
Node resource group lockdown (NRG lockdown) prevents accidental deletion of the VMSS.
#41 After the cluster is restarted (stop/start), the current node count is outside the autoscaler's min/max range
You're using the autoscaler for a Microsoft Azure Kubernetes Service (AKS) cluster. When you restart your cluster, your current node count doesn't fall within the minimum and maximum range of values that you set.
Symptom: After az aks start, the node count is below minCount or above maxCount. Later update operations report errors about the node count being out of range.
Root cause: Stopping the cluster releases the nodes. On start, AKS restores the node count recorded before the stop. If min/max was changed while the cluster was stopped (or before), the recorded count falls outside the new range.
Diagnostic commands
az aks nodepool list -g $RG --cluster-name $CLUSTER --query "[].{n:name,cnt:count,min:minCount,max:maxCount}" -o table
Fix
az aks nodepool update -g $RG --cluster-name $CLUSTER -n nodepool1 --update-cluster-autoscaler --min-count 1 --max-count 5
# Make the range include the current count; CA will then adjust it based on load
Prevention and best practices
In automation that stops and starts development clusters overnight, do not change the CA range at the same time. NAP clusters cannot be stopped (a NAP limitation).
#42 0/(X) nodes are available: Insufficient CPU / Y node(s) had untolerated taint
Error: 0/(X) nodes are available: Insufficient CPU.
Error: 0/(X) nodes are available: Y node(s) had untolerated taint.
Symptom: A newly deployed Pod is Pending, but the cluster does not look CPU-heavy.
Root cause: The scheduler looks only at requests and allocatable capacity, not at actual usage. AKS reserves resources for kubelet and system components (the larger the node, the smaller the reserved share), and DaemonSets (monitoring, Defender, CSI) take up more. Taints: system node pools often set CriticalAddonsOnly=true:NoSchedule, Spot pools automatically carry kubernetes.azure.com/scalesetpriority=spot:NoSchedule, and GPU pools often add sku=gpu:NoSchedule. Pods without a matching toleration cannot be scheduled there.
Diagnostic commands
kubectl describe pod <pod> -n lab8-m4 | sed -n '/Events/,$p'
kubectl get nodes -o custom-columns=NAME:.metadata.name,CPU:.status.allocatable.cpu,MEM:.status.allocatable.memory,TAINTS:.spec.taints[*].key
kubectl describe node <node> | sed -n '/Allocated resources/,/Events/p'
Fix
Insufficient: lower the requests (based on VPA recommendations), enable CA/NAP, or add a user node pool.
Taints: add tolerations to the workloads that need them. For regular applications, use a user node pool, and do not add a CriticalAddonsOnly toleration to them.
Prevention and best practices
Set default requests with a namespace LimitRange. Allocate quotas (ResourceQuota) per team.
Add the CriticalAddonsOnly taint to the system pool, so that user workloads run only on user pools.
#43 NAP: NodeClaim READY=Unknown, new node NotReady (Overlay Pod CIDR exhausted); empty nodes are slow to be reclaimed
$ kubectl get nodeclaim
NAME TYPE CAPACITY ZONE NODE READY AGE
default-abcde Standard_D16as_v5 on-demand eastus-2 aks-default-abcde Unknown 3m13s
Symptom: On a NAP cluster during a scale-out peak, nodes created later stay NotReady. Or, after load drops, nodes take a long time to scale back in.
Root cause: In Overlay mode, each node is pre-allocated a /24 from the Pod CIDR. A /16 Pod CIDR supports at most 256 nodes; beyond that, new nodes get no Pod address range. NAP is more likely to hit this when it creates many small and medium nodes. Nodes not being reclaimed can be caused by disruption budgets, the karpenter.sh/do-not-disrupt annotation, PDBs, or a consolidation policy set to consolidate only empty nodes.
Diagnostic commands
kubectl get nodeclaims -o wide; kubectl get nodepools.karpenter.sh
kubectl describe nodeclaim <name> | sed -n '/Conditions/,$p'
az aks show -g $RG -n $CLUSTER --query "networkProfile.podCidr" -o tsv
kubectl get nodes --no-headers | wc -l
kubectl get events -A --field-selector source=karpenter --sort-by=.lastTimestamp | tail
Fix
Pod CIDR exhausted: limit the node count (NodePool limits) and prefer larger VM sizes. If you need more nodes, evaluate expanding the Pod CIDR as described in the documentation, or create a new cluster.
Not reclaimed: check the NodePool disruption settings (consolidationPolicy, budgets) and any annotations or PDBs that block disruption.
Prevention and best practices
Include this in capacity planning: the maximum node count must be less than or equal to the number of /24 blocks the Pod CIDR can provide.
NAP limitations: not supported on Windows, IPv6, or service principal clusters. Once NAP is enabled, the cluster cannot be stopped, and the outbound type cannot be changed (Microsoft documentation).
#44 KEDA add-on: Failed to get API Group-Resources {"error": "Get \"https://10.0.0.1:443/api?timeout=32s\": EOF"}
ERROR Failed to get API Group-Resources {"error": "Get \"https://10.0.0.1:443/api?timeout=32s\": EOF"}
ERROR setup unable to start manager {"error": "Get \"https://10.0.0.1:443/api?timeout=32s\": EOF"}
Symptom: The KEDA operator and metrics-apiserver Pods restart repeatedly. ScaledObject has no effect, and the HPA shows <unknown> metrics.
Root cause: The first cause listed in the documentation is that a cluster firewall or outbound configuration blocks the traffic KEDA needs to reach the API server. Another common cause is that a self-installed open-source KEDA already exists in the cluster, and enabling the add-on on top of it causes a conflict (two sets of CRDs and webhooks). KEDA 2.15+ removed Pod Identity support, so a TriggerAuthentication that still uses podIdentity.provider: azure stops working. Change it to azure-workload.
Diagnostic commands
kubectl get pods -n kube-system | grep keda
kubectl logs -n kube-system -l app=keda-operator --tail=30
kubectl get crd | grep keda.sh; helm list -A | grep -i keda # check for a self-installed KEDA
kubectl get scaledobject -A; kubectl get hpa -A
Fix
Allow the traffic according to the AKS outbound rules (#17). Confirm that the nodes where the KEDA Pods run can reach the API server.
Uninstall the self-installed KEDA before you enable the add-on (as the documentation recommends). Migrate TriggerAuthentication to Workload Identity.
Prevention and best practices
The add-on's KEDA version is tied to the Kubernetes version (the documentation has a mapping table). Before you upgrade Kubernetes, check ScaledObject compatibility.
#45 Azure Disk: cannot be attached to the VM because it is not in the same zone as the VM / Multi-Attach error for volume
AttachVolume.Attach failed for volume "<disk/PV name>": … Disk … cannot be attached to the VM because it is not in the same zone as the VM. VM zone: 'X'. Disk zone: 'Y'.
Multi-Attach error for volume "<PV/disk-name>" Volume is already used by pod(s) <pod-name>
(scheduling stage) 0/(X) nodes are available: Y node(s) had volume node affinity conflict.
Symptom: A stateful Pod is evicted or recreated (during an upgrade, a node failure, or a Spot reclaim) and is stuck in ContainerCreating. Or, during a Deployment rolling update, the new Pod cannot mount its volume.
Root cause: The built-in Azure Disk storage class uses LRS disks by default. These disks belong to one availability zone and can attach only to nodes in that zone. In a multi-zone node pool, a Pod scheduled into a different zone fails (or reports a volume node affinity conflict during scheduling). Azure Disk is ReadWriteOnce: it can attach to only one node at a time. A Deployment's RollingUpdate can make the old and new Pods need it on different nodes at the same time, which causes Multi-Attach.
Diagnostic commands
kubectl get pv <pv> -o jsonpath='{.spec.nodeAffinity}'; echo
kubectl get nodes -L topology.kubernetes.io/zone
kubectl get volumeattachment | grep <pv>
kubectl get sc -o custom-columns=NAME:.metadata.name,SKU:.parameters.skuName,BIND:.volumeBindingMode
Fix
Zones: use a storage class with the WaitForFirstConsumer binding mode (the built-in class already does). When the volume must move across zones, use ZRS disks (skuName: Premium_ZRS) or Azure Files. Or use node affinity to pin the Pod to the zone where the disk is.
Multi-Attach: for a single-replica stateful app, use a StatefulSet, or change the Deployment to strategy: Recreate. Confirm that the old Pod has actually terminated. After a node failure, you may need to wait about 6 minutes for a forced detach; follow the actual behavior.
Prevention and best practices
Define the storage classes for stateful workloads at the platform level (LRS single zone / ZRS cross-zone). Before an upgrade, confirm that every zone has available node capacity, including the zone where the surge node will be created.
#46 Azure Files: Output: mount error(13): Permission denied / mount error(2): No such file or directory
MountVolume.MountDevice failed for volume "…" : rpc error: code = Internal desc = volume(…) mount "//<storage-account-name>.file.core.windows.net/<pv-fileshare-name>" on "…" failed with mount failed: exit status 32
Output: mount error(13): Permission denied
Symptom: A Pod using Azure Files (SMB) is stuck in ContainerCreating. It appears after the storage account key is replaced or the storage firewall is turned on.
Root cause (the documentation lists 6 categories): the storage account name or key in the K8s Secret does not match the actual one (the key was rotated); the storage account firewall does not allow the AKS subnet; the private endpoint is not on the same network or DNS as the nodes; the storage account requires SMB encryption or security settings (such as disabling NTLMv2 or a minimum encryption level) that the client does not meet. error(2) is usually caused by a file share that does not exist, an NSG or firewall blocking port 445, or a FIPS node pool.
Diagnostic commands
kubectl describe pod <pod> -n lab8-m4 | sed -n '/Events/,$p'
kubectl get secret -n lab8-m4 | grep azure-storage-account
az storage account show -n <sa> --query "{public:publicNetworkAccess,rules:networkRuleSet.defaultAction,smb:azureFilesIdentityBasedAuthentication}" -o json
# Test port 445 from a node: kubectl debug node/<node> -it --image=mcr.microsoft.com/azurelinux/busybox:1.36 -- nc -vz <sa>.file.core.windows.net 445
Fix
Keys: update the Secret (the one the driver created during dynamic provisioning), then recreate the Pods. Or switch to mounting with a managed identity (follow the Azure Files CSI documentation).
Network: allow the AKS subnet on the storage account (service endpoint), or use a private endpoint plus privatelink.file.core.windows.net DNS.
Prevention and best practices
A storage key rotation procedure includes 'update the AKS Secret + rolling restart'. Prefer NFS (Premium) or identity-based authentication to reduce reliance on keys.
#47 Namespace / Pod stuck in Terminating for a long time (finalizers, unreachable API service, node lost)
$ kubectl get ns lab8-m4
NAME STATUS AGE
lab8-m4 Terminating 2h
$ kubectl get ns lab8-m4 -o jsonpath='{.status.conditions[*].message}'
Some content in the namespace has finalizers remaining: example.com/cleanup in 1 resource instances
(or) Discovery failed for some groups, 1 failing: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request
Symptom: After you delete a namespace (or uninstall a Helm release), it never finishes. During an upgrade, drain gets stuck on a Terminating Pod (combined with #8).
Root cause: Deleting only sets deletionTimestamp. The actual deletion waits until every finalizer has been removed by the controller responsible for it. If that controller has been uninstalled or is unhealthy, the wait never ends. Deleting a namespace also has to enumerate all API groups, so one unavailable aggregated API (metrics-server, KEDA metrics, or a custom APIService) can block it. When the node hosting a Pod is lost, the kubelet cannot confirm that the process has stopped.
Diagnostic commands
kubectl get ns lab8-m4 -o json | jq '.status.conditions'
kubectl api-resources --verbs=list --namespaced -o name | xargs -n1 kubectl get -n lab8-m4 --ignore-not-found --show-kind 2>/dev/null | head
kubectl get apiservice | grep -v True
kubectl get pod <pod> -n lab8-m4 -o jsonpath='{.metadata.finalizers}{" "}{.spec.nodeName}'; echo
Fix
Preferred: fix or restore the controller responsible for the finalizer, or restore the unavailable APIService, so that the cleanup completes normally.
Only after you confirm that the cleanup has been completed another way, remove the finalizer manually: kubectl patch <kind> <name> -n lab8-m4 --type=json -p='[{"op":"remove","path":"/metadata/finalizers"}]'.
Force-deleting a Pod (--grace-period=0 --force) is a last resort. Microsoft's documentation warns that it does not wait for the node to confirm that the process has stopped, and a StatefulSet may end up with two writers.
Prevention and best practices
Before you uninstall an operator, delete its custom resources first. Before you delete a namespace, check that the APIService is healthy.
#48 Status=429 TooManyRequests / Throttled: The server rejected the request because too many requests have been received for this subscription
Status=429 Code="OperationNotAllowed" Message="The server rejected the request because too many requests have been received for this subscription." … "code":"TooManyRequests" … "operationGroup":"HighCostGetVMScaleSet30Min" …
SubCode: Throttled; … Status=429 Code="Throttled" Message="The PutManagedClusterHandler.PUT request limit has been exceeded for SubID='<subscription-id-guid>', please retry again in X seconds. …"
Symptom: When a subscription has many clusters or node pools, scaling slows down, CA reports errors, and pipeline bulk operations fail. Sometimes the portal also loads slowly.
Root cause: The Azure compute resource provider and the AKS RP both enforce throttling per subscription and per region. Components that call GET on VMSS frequently (older CA versions, custom monitoring scripts, third-party tools), or creating or updating many clusters in parallel, can exhaust the quota. The impact falls on all clusters in the subscription.
Diagnostic commands
az monitor activity-log list --offset 2h --query "[?properties.statusCode=='TooManyRequests' || contains(to_string(properties),'429')].{op:operationName.value,caller:caller}" -o table | head
kubectl logs -n kube-system -l app=cluster-autoscaler --tail=50 2>/dev/null | grep -i 429 # view managed CA logs through diagnostic settings
Fix
Find the caller (the caller in the activity log, or the client identified in the request headers), and reduce its polling frequency. Keep clusters on a supported version, since newer CA versions make fewer Azure calls.
In pipelines, add concurrency limits and exponential backoff retries for bulk cluster operations.
Prevention and best practices
At scale, spread clusters across subscriptions and cap the number of clusters and nodes per subscription, rather than putting them all in one subscription.
#49 Error: Unable to get log analytics workspace info / Unable to retrieve log analytics workspace (upgrade or scale-out fails after the workspace is deleted)
Failed to save container service '<container service name>'.
Error: Unable to get log analytics workspace info.
Resource ID: /subscriptions/…/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-…-weu.
Detail: operationalinsights.WorkspacesClient#GetSharedKeys: Failure responding to request: StatusCode=404 … Code='ResourceGroupNotFound' …
Symptom: The cluster ran normally, then one day a start, upgrade, or scale-out failed. Nobody remembers changing the cluster.
Root cause: Someone deleted the Log Analytics workspace, or its resource group (commonly DefaultResourceGroup-XXX), while cleaning up costs, but the monitoring add-on was still enabled on the cluster. From then on, every write operation requires the RP to read the workspace. A 404 causes the whole operation to fail.
Diagnostic commands
az aks show -g $RG -n $CLUSTER --query "addonProfiles.omsagent.config.logAnalyticsWorkspaceResourceID" -o tsv
az monitor log-analytics workspace show --ids <the ID above> -o table
Fix (the documentation gives three options)
Within the 14-day soft-delete period: recreate a resource group with the same name, then restore the workspace (AKS looks it up by resource URI).
If you no longer need monitoring: az aks disable-addons -a monitoring -g $RG -n $CLUSTER.
To use a new workspace: re-enable the monitoring add-on and specify the new workspace ID.
Prevention and best practices
Monitoring workspaces are managed by the platform's IaC and protected with delete locks. Do not use auto-generated DefaultResourceGroup workspaces.
InvalidManagedClusterSKUForFeature → cluster is on the Free tier; cost analysis is not available
InvalidDiskCSISettingForCostAnalysis → Azure Disk CSI driver is disabled
InvalidManagedIdentitySettingForCostAnalysis → managed identity is not used
CostAnalysisNotEnabledInRegion → region not supported
cost-analysis-agent Pod OOMKilled / Pending
Symptom:az aks update --enable-cost-analysis fails. Or, after it is enabled, namespace-level costs do not appear in Microsoft Cost Management, and the cost-analysis-agent Pod misbehaves.
Root cause: The cost analysis add-on exports Kubernetes namespace and asset data to Cost Management. It has prerequisites: Standard or Premium tier, managed identity, the Azure Disk CSI driver enabled, and a supported region. In large clusters, the agent's default memory may not be enough.
Diagnostic commands
az aks show -g $RG -n $CLUSTER --query "{tier:sku.tier,identity:identity.type,diskCsi:storageProfile.diskCsiDriver.enabled,cost:metricsProfile.costAnalysis.enabled}" -o json
kubectl get pods -n kube-system | grep cost-analysis
Fix
az aks update -g $RG -n $CLUSTER --tier standard # Free → Standard (has a cost)
az aks update -g $RG -n $CLUSTER --enable-disk-driver # if it is disabled
az aks update -g $RG -n $CLUSTER --enable-cost-analysis
Prevention and best practices
Cost visibility is a platform baseline. Production clusters should all use the Standard tier, cost analysis, and namespace and label conventions. For development clusters, save with stop/start and Spot (Q38).
Figure 4-1 CA scales the existing pools; NAP creates the right node
Figure 4-2 Locate storage problems by stage
Pending Pod scale-out decision simulator
Choose a scenario and run it. Observe what the scheduler, Cluster Autoscaler (or NAP), and the Azure compute layer each do, and where each one stops. The logic is simplified based on the AKS and upstream cluster-autoscaler documentation.
$ Waiting to run…
Environment and cost The lab uses aks-lab (about US$0.5 per hour). Lab 4-A raises the CA maxCount to the current node count plus 1, which may add 1 node (billed per node-hour). Lab 4-C creates a small Premium SSD disk (a few cents). Required role: Contributor on the resource group. When you finish all the labs, clean up immediately and restore the CA settings.
Lab 4-A: requests too large, CA does not scale out (#39, #42)
RG=rg-aks-lab; CLUSTER=aks-lab
az aks nodepool show -g $RG --cluster-name $CLUSTER -n nodepool1 --query "{auto:enableAutoScaling,min:minCount,max:maxCount,count:count,vm:vmSize}" -o table
az aks nodepool update -g $RG --cluster-name $CLUSTER -n nodepool1 --enable-cluster-autoscaler --min-count 2 --max-count 3 2>/dev/null \
|| az aks nodepool update -g $RG --cluster-name $CLUSTER -n nodepool1 --update-cluster-autoscaler --min-count 2 --max-count 3
kubectl create ns lab8-m4
kubectl -n lab8-m4 create deployment big --image=$ACR.azurecr.io/myapp:1.0
kubectl -n lab8-m4 set resources deploy/big --requests=cpu=32,memory=8Gi # larger than any D4s_v5 node
sleep 90; kubectl -n lab8-m4 get events --field-selector reason=NotTriggerScaleUp
LAST SEEN TYPE REASON OBJECT MESSAGE
40s Normal NotTriggerScaleUp pod/big-7c9… pod didn't trigger scale-up: 1 Insufficient cpu
Change the requests to values that a new node can fit, then watch CA scale out:
kubectl -n lab8-m4 set resources deploy/big --requests=cpu=3,memory=2Gi
kubectl -n lab8-m4 scale deploy/big --replicas=3
kubectl get nodes -w # a new node appears in 1–3 minutes; press Ctrl+C
kubectl -n lab8-m4 get events --field-selector reason=TriggeredScaleUp
Lab 4-B: manually scale a node pool with CA enabled (#40)
az aks nodepool scale -g $RG --cluster-name $CLUSTER -n nodepool1 --node-count 4
(BadRequest) Cannot scale cluster autoscaler enabled node pool. …
Correct approach:
az aks nodepool update -g $RG --cluster-name $CLUSTER -n nodepool1 --update-cluster-autoscaler --min-count 2 --max-count 4
Lab 4-C: RWO disk + RollingUpdate = Multi-Attach (#45)
Clean up the whole module and restore the CA settings:
kubectl delete ns lab8-m4 --wait=true # also deletes the PVC and the disk (default reclaimPolicy: Delete)
az aks nodepool update -g $RG --cluster-name $CLUSTER -n nodepool1 --update-cluster-autoscaler --min-count 2 --max-count 3
# If CA was not enabled before the lab: az aks nodepool update … --disable-cluster-autoscaler, then az aks nodepool scale … --node-count 2
Video lessons (titles and channels verified with YouTube oEmbed)
Module 5 · Part B: Architecture and fundamentals (interview questions 1–13)
30:00 – 37:00 · Responsibility boundaries, pricing tiers and SLA, Automatic vs Standard, the creation flow, the MC_ resource group, node pools, identity, version policy, add-ons, access, node sizing, availability zones, stop/start
7 minutesManaged control plane · MC_* · VMSS13 questions
Learning goals
In one sentence, explain the AKS responsibility boundary: Microsoft manages the control plane (etcd, API server, scheduler, controllers) and provides the SLA. You are responsible for node pool configuration and upgrade timing, networking, identity, workloads, and data.
Be able to draw on a whiteboard the resources and flow behind az aks create, and explain why you must not modify MC_* by hand.
Be able to answer the high-frequency 2026 interview follow-ups on the version support policy, LTS, and platform-initiated upgrades.
Skim the questions and the points each one tests, and mark the ones you're not sure about. Click a row to jump to the detailed answer.
Q1. What is AKS? What do Microsoft and you each own? Beginner
30-second answer
AKS is Azure's managed Kubernetes. Microsoft runs and upgrades the control plane (API server, etcd, scheduler, controller-manager, cloud-controller-manager). You cannot see it, and you do not pay for its VMs. Nodes are VMSS (or VM) instances in your subscription, and they are billed as VMs. You are responsible for choosing the version and planning upgrades, node pool design, networking and egress, identity and RBAC, workloads, and data backup and compliance.
Deeper answer
The control plane runs in a Microsoft-managed subscription. It is exposed through a public FQDN, a private endpoint, or an internal load balancer with API Server VNet integration.
The node resource group MC_<rg>_<cluster>_<region> contains VMSS, load balancers, public IPs, NSGs, route tables, and managed disks, all managed by the AKS RP.
The 'shared responsibility' middle ground: AKS provides node OS patches through images and channels (NodeImage/SecurityPatch), but when they are applied is up to you (maintenance windows).
Common follow-up questions
How is control plane high availability guaranteed? The Standard and Premium tiers provide a financially backed SLA: 99.95% with availability zones, 99.9% without (Q2).
What does AKS Automatic change? Even the system node pool is managed by AKS (Q3).
Bonus points
Mention platform-initiated upgrades: even if you do nothing, AKS will force an upgrade once the support grace period ends. The responsibility boundary does not mean you can never upgrade.
Common wrong answers
'AKS is serverless, and Microsoft manages the nodes too.' In Standard mode, the nodes are entirely in your subscription, so quota, patch timing, and capacity are all your responsibility.
Q2. What are the differences between the Free, Standard, and Premium pricing tiers? Which one should you choose for production? Beginner
30-second answer
All three tiers include the full set of AKS features. The differences are the SLA and support. Free has no financially backed SLA. It is recommended for development and testing with fewer than 10 nodes, and it supports up to 1,000 nodes. Standard includes an API server availability SLA by default (99.95% with availability zones, otherwise 99.9%), supports up to 5,000 nodes, and also covers the Pod readiness SLA. Premium = Standard + 24 months of LTS (long-term support). Choose Standard for production, and choose Premium for long version freezes (regulated industries).
Deeper answer
az aks create … --tier standard
az aks update -g $RG -n $CLUSTER --tier premium --k8s-support-plan AKSLongTermSupport
Tiers are billed per cluster-hour. Check the Azure pricing page for current prices, and do not quote specific figures in an interview unless you have verified them.
AKS Automatic is preconfigured on the Standard tier.
LTS versions continue to receive maintenance from Microsoft after community EOL. To enable LTS on Kubernetes ≥ 1.33, first switch the node pool to Ubuntu 24.04 (as noted in the docs).
Common follow-up questions
Can the Free tier run production? Technically yes, but it has no SLA, and some add-ons (such as cost analysis, #50) require Standard or higher.
Bonus points
Point out that the SLA covers only control plane availability (plus the Pod readiness SLA terms for Standard). Application availability still depends on node pools spanning availability zones, PDBs, and replica counts.
Common wrong answers
“Premium tier performs better” — the tier does not change VM performance.
Q3. What is the difference between AKS Automatic and AKS Standard? When should you not use Automatic? Intermediate
30-second answer
Automatic is a “production default with opinions”: the system node pool and system components are managed by AKS (running in AKS's subscription). NAP selects and scales nodes automatically. It comes preconfigured with Azure CNI Overlay + Cilium, Entra authentication + Azure RBAC, Workload Identity, Deployment Safeguards with a baseline Pod security setup, automatic upgrades (stable channel + NodeImage), and the Standard tier. Standard gives you full control. Use Standard when you need Windows nodes, special networking (kubenet/flat CNI), a custom system pool, or privileged workloads that Safeguards block.
Deeper answer
Automatic features fall into three categories: preconfigured (cannot be turned off), default (can be changed), and optional (can be turned on).
NAP does not support Windows, IPv6, or service principals. NAP clusters cannot be stopped (Q13, #43).
Migration approach: on Standard, enable the Automatic components one at a time (Overlay+Cilium, WI, Safeguards in Warn mode), and assess the gaps.
Common follow-up questions
What do you still manage with Automatic? Workload requests and PDBs, network ingress, identity and authorization, cost, upgrade windows, and application compatibility.
Bonus points
Say: “Automatic is not serverless. The node VMs are still in your subscription and billed per VM; only the sizing and scaling are automated.”
Common wrong answers
“Automatic is a preview feature and cannot be used in production” — Automatic is GA (per the 2026-11 docs).
Q4. What happens in Azure, step by step, after you run az aks create? Intermediate
30-second answer
CLI calls ARM (PUT managedClusters) → ARM performs authentication, RBAC, Policy, and RP registration checks → the request is forwarded to the AKS resource provider → the RP validates parameters (version, CIDRs, subnets) → the control plane is created in the Microsoft-managed subscription → in your subscription, the node resource group MC_*, identities, LB/NAT, and VMSS are created → each VM runs CSE (Custom Script Extension) to install and configure containerd and kubelet, and connects to the API server → kubelet registers the node → the RP deploys add-ons and system components (CoreDNS, konnectivity, CSI, metrics-server) → provisioningState = Succeeded.
Deeper answer
az aks create
├─ ARM: authentication / RBAC / Azure Policy (#36) / RP registration (#2)
├─ AKS RP: parameter and network validation (#13 #14 #15), version (#6)
├─ Control plane (Microsoft-managed subscription)
├─ MC_*: identities, LB/NAT GW, NSG, route table, VMSS
├─ VMSS instance allocation: quota (#1) / capacity (#3) / subnet IPs (#10)
├─ CSE bootstrap: outbound (#4 exit 50) / API server connectivity and DNS (#5 exit 51/52)
├─ kubelet registration → Node Ready
└─ Add-ons / extensions
Common follow-up questions
How do you find out which step a failed creation stopped at?az aks operation show-latest (aks-preview), the activity log, and the extension status on the VMSS instances.
Bonus points
Be able to map each error code to the specific step in the flow where it occurs (Figure 1-1 in this hour).
Common wrong answers
“Kubernetes itself creates the nodes” — the AKS RP creates them through the Azure compute API, and CA/NAP also call the Azure API.
Q5. What is the node resource group MC_*? Why should it not be modified by hand? How do you prevent changes? Intermediate
30-second answer
MC_* is a resource group that AKS creates automatically for the cluster. It holds the infrastructure: VMSS, load balancers, public IPs, NSGs, route tables, disks, and so on, and the AKS RP manages it declaratively. Manual changes (deleting a VMSS, editing an NSG, editing the VMSS model) conflict with the RP's desired state. They cause upgrade or scaling failures, or get overwritten, and they are unsupported operations. You can use node resource group lockdown (NRG lockdown, --nrg-lockdown-restriction-level ReadOnly) to block user modifications.
Deeper answer
You can set the name at creation with --node-resource-group to meet a naming policy (#36).
If you need custom network rules, bring your own VNet and add the rules to the NSG on your own subnet (#24). Do not change the NSG in MC_.
Deleting the cluster deletes the MC_ resource group. Do not put other resources in it.
Common follow-up questions
What if someone deletes a VMSS?az aks nodepool update reconciles it (#40).
Bonus points
Mention that the kubelet identity is also part of the node resource group context. If it is removed from the VMSS, ACR pulls fail with a 401 (#26, Solution 4 in the docs).
Q6. What is the difference between system and user node pools? How do you design them? Beginner
30-second answer
Every cluster has at least one System-mode node pool, which runs critical system Pods such as CoreDNS, konnectivity, and metrics-server. User node pools run applications and can be scaled to 0. Production recommendations: a dedicated system pool (add the CriticalAddonsOnly=true:NoSchedule taint), at least 3 nodes spread across availability zones, and medium-sized VMs. Split applications into several user pools by workload type (general purpose, memory-optimized, Spot, GPU, Arm).
Deeper answer
az aks nodepool add -g $RG --cluster-name $CLUSTER -n sys2 --mode System --node-taints CriticalAddonsOnly=true:NoSchedule --zones 1 2 3 --node-count 3
az aks nodepool add -g $RG --cluster-name $CLUSTER -n apps --mode User --zones 1 2 3 --enable-cluster-autoscaler --min-count 2 --max-count 10
A system pool cannot be Spot and must be Linux. The last system pool cannot be deleted.
The system pool in AKS Automatic is managed by AKS, and you cannot see it.
Common follow-up questions
Why did application Pods end up on the system pool? The system pool has no taint (the reverse of #42).
Bonus points
Tie it to upgrades: node pools can be upgraded independently, and each can have its own maxSurge, so you can reduce risk by upgrading pool by pool.
Common wrong answers
“Running everything on one big node pool is the cheapest” — this ignores failure domains, upgrade blast radius, and scheduling isolation.
Q7. Which identities does AKS use? What do the cluster identity, kubelet identity, and workload identity each do? Intermediate
30-second answer
Cluster (control plane) identity: a managed identity, user-assigned or system-assigned, that AKS uses to manage Azure resources (LBs, public IPs, disks, route tables, private DNS zones). Kubelet identity: used by nodes to pull images from ACR and to access some Azure resources. Workload identity: Pods get tokens through Entra federated credentials to access Key Vault or storage. People and pipelines also use Entra identities to access the API server. Service principals are the older approach, and their secrets expire (#35).
Deeper answer
With a BYO VNet or a self-managed private DNS zone, the cluster identity has to be authorized in advance, so use a user-assigned identity (#21, #24).
The kubelet identity gets only minimal permissions such as AcrPull. Do not let applications borrow it: any Pod can obtain the node identity token through IMDS, so block that with network policy or use WI.
Common follow-up questions
What about Pod Identity? AAD Pod Identity is deprecated and archived. Migrate to Workload Identity.
Bonus points
Every “denied” error can be mapped to one type of identity (Figure 3-1 in this hour).
Common wrong answers
“Giving the cluster identity Owner is easier.” This violates least privilege, and its impact covers the whole subscription.
Q8. What is AKS's Kubernetes version support policy? What are LTS and platform-initiated upgrades? Intermediate
30-second answer
AKS supports GA minor versions for about 12 months, and usually supports 4 GA minor versions at the same time (1.34–1.37 as of 2026-11). Upgrades usually go one minor version at a time. LTS (Premium tier) continues to receive maintenance after community EOL, for 24 months in total. After a version reaches EOL, there is a platform support grace period. Clusters that are still not upgraded when the grace period ends are forcibly upgraded by a platform-initiated upgrade. This ignores maintenance windows, may get past PDBs, and does not stop when deprecated APIs are detected.
Deeper answer
az aks get-versions -l canadacentral -o table # The SupportPlan column shows KubernetesOfficial / AKSLongTermSupport
az aks get-upgrades -g $RG -n $CLUSTER -o table
Patch versions can be skipped. The control plane cannot skip several minor versions (#6). A node pool cannot be newer than the control plane (#7).
Azure Resource Graph can query the versions and EOL risk of all clusters.
Common follow-up questions
How do you avoid platform-initiated upgrades? The only way is to stay on a supported version: an auto-upgrade channel with a maintenance window, or LTS.
Bonus points
Know the current calendar: 1.34 community support ends in 2026-11, and 1.38 is in preview in 2026-11 with GA planned for 2027-02.
Common wrong answers
“If the cluster is not upgraded, it will stay on its current version.”
Q9. What is the difference between add-ons, extensions, and managed components? Intermediate
30-second answer
Add-ons are installed and managed directly by the AKS RP. AKS sets their versions according to the cluster and Kubernetes versions, and they are covered by AKS support (monitoring, Azure Policy, Key Vault CSI, application routing, KEDA, VPA, and so on; enabled with az aks enable-addons or --enable-*). Extensions are installed through the Cluster Extensions framework in Microsoft.KubernetesConfiguration (Flux GitOps, Dapr, Azure Backup, Azure Machine Learning). They have their own versions and automatic upgrade settings, and they can also be used on Arc clusters. Open-source components you install yourself (ingress-nginx, KEDA, or cert-manager installed with Helm) are entirely your responsibility.
Deeper answer
Do not install an add-on and an open-source component with the same name at the same time (KEDA conflicts, #44).
Add-on or self-install? Add-ons reduce operations work and are supported, but they offer less flexibility in versions and configuration. If you need a specific version or feature, self-install and take on the upgrade compatibility testing.
Bonus points
Mention lifecycle risk: the critical security patches for the NGINX in the application routing add-on are only available until 2026-11, so plan a move to a Gateway API implementation (#25).
Q10. How do users access AKS? How do kubeconfig, Entra, kubelogin, and local accounts work together? Beginner
30-second answer
az aks get-credentials downloads the kubeconfig. For a cluster integrated with Entra, the kubeconfig uses the exec plugin kubelogin to get an Entra token. The API server authenticates with that token, then authorizes through Azure RBAC or Kubernetes RBAC. --admin gives you the local clusterAdmin certificate, which bypasses Entra. In production, use --disable-local-accounts (#31). Downloading the kubeconfig requires an Azure role (Cluster User Role), but data-plane permissions are a separate matter (#29).
Deeper answer
az aks get-credentials -g $RG -n $CLUSTER
kubelogin convert-kubeconfig -l azurecli # For CI; people can use devicecode or interactive
kubectl auth whoami
Common follow-up questions
How do you do break-glass access? Use an Entra admin group activated through PIM, not a local account.
How long do tokens last? Entra access tokens typically last about 1 hour, and kubelogin refreshes them automatically (depends on the Entra configuration).
Bonus points
Mention that Conditional Access can apply to Entra sign-in to AKS.
Q11. How do you choose the VM size and OS disk for a node pool? Intermediate
30-second answer
Choose the series based on the workload shape (general-purpose D, memory-optimized E, compute-optimized F, GPU N, Arm Dp). A node should not be too small, because system reservation and DaemonSet overhead take a large share and maxPods limits the Pod count. It should not be too large either, because of failure domain size and surge cost during upgrades. Prefer ephemeral OS disks (they use the VM's local storage, with low latency, fast reimaging, and no disk charges), as long as the VM's cache/temp disk is large enough. For the node OS, prefer Azure Linux or Ubuntu 24.04 (Ubuntu 22.04 stops being supported on 2027-06-30).
Deeper answer
Capacity redundancy: prepare alternative SKUs (#3), and watch quota (#1).
maxPods: Overlay defaults to a higher value (check the docs). With flat CNI, work it out together with subnet planning (#10).
Common follow-up questions
How do you choose between D4 × 10 and D16 × 3? Consider the Pod size distribution, the availability zone spread (at least 3 nodes), surge cost during upgrades, and licensing (software licensed per core).
Bonus points
Mention that NAP can choose sizes automatically based on requests, which reduces manual sizing (Q27).
Common wrong answers
“Bigger is cheaper” or “smaller is more flexible.” Both ignore allocatable resources and failure domains.
Q12. How does AKS achieve high availability? What should you watch for with availability zones? Intermediate
30-second answer
Control plane: Standard/Premium tier in an availability zone region → 99.95% SLA. Data plane: spread node pools across 3 availability zones (--zones 1 2 3, which can only be set when the node pool is created), at least 3 replicas plus topologySpreadConstraints, PDBs, and cross-zone ingress (the standard LB and AGW v2 are zone-redundant). Storage is the biggest pitfall: LRS disks belong to a single zone, so you need ZRS disks or application-level replication (#45). For cross-region DR, use multiple clusters with traffic management (Q44).
CA tries to balance across node pools that span multiple availability zones (balance-similar-node-groups and related parameters; check the docs).
Common follow-up questions
Is cross-zone traffic charged? Azure's charges for data transfer between availability zones in the same region follow the official pricing. For high-traffic services, use topology-aware routing to reduce cross-zone traffic.
Bonus points
Distinguish the “control plane SLA” from “application availability”, and be able to state the zone strategy for stateful workloads.
Common wrong answers
“We turned on the Standard tier, so the application is highly available.”
Q13. What do az aks stop and start do? Where do they apply, and what are their limitations? Beginner
30-second answer
az aks stop stops the control plane and releases all nodes. No node compute charges accrue while stopped (disks, public IPs, and so on are still billed). start rebuilds the nodes and restores the cluster state (etcd is preserved). It suits dev/test clusters that should save cost overnight and on weekends. Limitations: a stopped cluster cannot perform most update operations; clusters with NAP cannot be stopped; after starting, the node count should be within the CA range (#41); and a cluster that stays stopped for a long time still faces version expiry.
Deeper answer
az aks stop -g $RG -n $CLUSTER
az aks show -g $RG -n $CLUSTER --query powerState.code -o tsv # Stopped
az aks start -g $RG -n $CLUSTER
Common follow-up questions
How is this different from scaling the user pool to 0? Scaling a pool keeps the control plane running, so the API stays available and GitOps keeps reconciling. Stop also stops the control plane. System pools cannot be scaled to 0.
Bonus points
Use Azure Automation, Logic Apps, or pipelines to stop and start on a schedule, and run a smoke test after start.
Figure 5-1: draw while you explain: two subscriptions, three resource groups, one connection
Scenario question 5-1: choosing an AKS form for a 30-person SaaS team
The team has no dedicated platform engineer. The app runs Linux containers with Azure SQL and Key Vault, it needs a production SLA, and the budget is tight. Choose Automatic or Standard? Give your reasons, and list what the team still has to own.
Key points of the reference answer
Lean toward Automatic: a managed system pool, NAP for automatic sizing and consolidation, a preconfigured security baseline (Entra + Azure RBAC, WI, Safeguards), automatic upgrades with maintenance windows, and the Standard tier SLA.
The team still owns: requests/limits and PDBs (otherwise both NAP and upgrades cause problems), ingress and DNS, permissions and networking for Key Vault and SQL (private endpoints), cost governance, and application compatibility with new Kubernetes versions.
If you need Windows nodes, privileged DaemonSets, or special networking, choose Standard, and enable the equivalent capabilities one by one.
Scenario question 5-2: a new colleague deleted an NSG rule and a public IP in the MC_ resource group
A LoadBalancer Service in the production cluster has become unreachable, yet az aks show still reports Succeeded. What happens? How do you recover? How do you prevent it?
Key points of the reference answer
Impact: the LB frontend IP is lost, so the service is unreachable. The NSG rule is missing, so traffic is denied. AKS's cloud-controller-manager reconciles the LB and NSG when the Service changes, but it does not necessarily notice right away.
Recovery: trigger reconciliation (edit the Service annotations or re-apply it). If needed, run az aks update --yes (#12). If you use a static public IP, you need to recreate it and update DNS.
Prevention: NRG lockdown (Q5), no RBAC write access to MC_ for people, static IPs kept in your own resource group and referenced with annotations, and Activity Log alerts.
Video lessons (titles and channels verified with YouTube oEmbed)
No verified high-quality video specifically about AKS interview questions was found. The results were mostly short videos or experience sharing, so none were included. Recommended: replay a recording of a mock interview.
Module 6 · Part B: Networking and security (interview questions 14–25)
37:00 – 44:00 · network models, Cilium, outbound types, SNAT, API server access, ingress, network policy, DNS, Entra and RBAC, Workload Identity, Key Vault, supply chain
7 minutesOverlay · NAT GW · WI · Policy12 questions
Learning goals
Be able to compare AKS network models and outbound types, and give a recommendation with address planning.
Be able to explain the three ways to protect the API server (authorized IP ranges, private cluster, API Server VNet integration) and the trade-offs of each.
Be able to present the “zero-secret” identity chain (Entra → Azure RBAC → Workload Identity → Key Vault) and the supply chain controls (ACR, signing, Policy, Defender) as one complete security baseline.
Skim the questions and the points each one tests, and mark the ones you're not sure about. Click a row to jump to the detailed answer.
Q14. Compare Azure CNI Overlay, Azure CNI (VNet / Pod subnet), and kubenet. Which should you choose for a new cluster? Intermediate
30-second answer
Overlay: nodes take IPs from the VNet, and Pods get IPs from a private Pod CIDR (one /24 per node). Traffic leaving the VNet is SNATed to the node IP. It is the most IP-efficient and scales well, and it is the default recommendation for new clusters. Azure CNI VNet: Pods get real VNet IPs and can be reached directly from peered networks or on-premises. In static mode, each node reserves 1 + maxPods IPs. In dynamic Pod subnet mode, IPs are allocated on demand. kubenet: relies on route tables, and it will be retired on 2028-03-31. Migrate to Overlay.
Deeper answer
Reasons to choose a VNet mode: external systems must reach Pods directly by Pod IP, or you need VNet-level visibility of Pod traffic. Otherwise, use Overlay.
Overlay planning constraints: the Pod CIDR determines the maximum number of nodes (/16 gives 256 nodes, #43), and the Pod CIDR must not overlap with the VNet or peered networks.
az aks create … --network-plugin azure --network-plugin-mode overlay --pod-cidr 192.168.0.0/16 --network-dataplane cilium
Common follow-up questions
Can on-premises networks reach Overlay Pods? Not directly by Pod IP. Traffic goes through a Service, LB, or ingress.
Bonus points
Be able to do the IP math: with a flat static-mode /24 subnet and maxPods=30, you can fit only about 8 nodes (#10).
Common wrong answers
“kubenet uses the fewest IPs, so choose it.” It has already been announced for retirement.
Q15. What does Azure CNI powered by Cilium bring? What are its limitations? Advanced
30-second answer
It uses an eBPF data plane in place of iptables kube-proxy. Service load balancing and network policy are enforced in the kernel through eBPF, which gives better performance and observability at large scale. It has a built-in network policy engine, so Azure NPM is no longer needed (NPM for Linux will be retired on 2028-09-30). With Advanced Container Networking Services, you get FQDN filtering, L7 policy, and traffic observability.
Deeper answer
Limitations listed in the docs: Linux only. The ipBlock in network policy cannot be used to allow node or Pod IPs. hostNetwork Pods are not subject to network policy. Workloads whose labels change frequently generate many Cilium identities. The Cilium ConfigMap only supports one type of change, label exclusion.
--network-dataplane cilium replaces the older --enable-ebpf-dataplane.
Common follow-up questions
Can I upgrade the Cilium version myself? No. Cilium is managed by AKS, and its version follows the Kubernetes version. If you need full control, you can use BYO CNI. Parts that AKS does not support are your responsibility.
Bonus points
Mention that when you migrate from NPM to Cilium network policy, check differences such as ipBlock usage and named ports.
Q16. What outbound types does AKS have, and what is each one suited for? Intermediate
30-second answer
loadBalancer (the default; standard LB outbound rules, with SNAT ports preallocated per node). managedNATGateway / userAssignedNATGateway (NAT Gateway; 64,512 ports per public IP, dynamically allocated, suited to heavy outbound traffic). userDefinedRouting (0.0.0.0/0 points to a firewall/NVA, suited to centralized outbound auditing in hub-spoke designs). none (no outbound configured; used in scenarios such as network-isolated clusters; check the docs).
Deeper answer
With UDR, you must allow the required AKS FQDNs (#4, #17), and avoid asymmetric routing for return traffic on inbound LBs.
NAT Gateway is an availability-zone resource, so consider zones in cross-zone designs. Its outbound IPs are fixed, which helps with third-party allow lists (it also affects ACR allow lists, #27).
You cannot change the outbound type after an NAP cluster is created (#43 limitation).
Common follow-up questions
How do you get a fixed outbound IP? Specify a public IP or prefix on the LB, use a NAT Gateway, or use a firewall's public IP.
Bonus points
Weigh the outbound type together with SNAT issues (Q17) and cost (firewalls are billed by the hour and by traffic).
Common wrong answers
“Use an NSG to restrict outbound traffic to the IPs AKS needs.” AKS depends on FQDNs, and those IPs are not fixed.
Q17. Explain SNAT port exhaustion. Why does it happen, how do you detect it, and how do you fix it? Advanced
30-second answer
Connections from Pods to the public internet are SNATed to the outbound IP:port. For a given destination IP:port, each outbound IP has a limited number of usable ports. In LB outbound mode, each node has a fixed number of preallocated ports. Many short-lived connections on a hot node, or connections that are not reused, will exhaust them, which shows up as intermittent i/o timeouts. Detection: the LB metrics SNAT Connection Count (Failed) and Used/Allocated Ports. Diagnosis: count ESTABLISHED connections to the public internet on the node. Fixes: reuse connections in the application → use Private Link to reach Azure services → add outbound IPs or adjust port allocation → use a NAT Gateway.
Deeper answer
Only connections to the public internet consume SNAT. Connections to private endpoints and addresses inside the VNet do not.
With manual port allocation, this must hold: ports per node × maximum node count ≤ 64,000 × number of outbound IPs. Otherwise you get InvalidLoadBalancerProfileAllocatedOutboundPorts.
TIME_WAIT and idle timeouts affect how quickly ports are reclaimed.
Common follow-up questions
Why does restarting Pods help? It releases connections, and Pods may be scheduled onto nodes with enough ports. This is a temporary fix, not a root-cause fix.
Bonus points
Tell a real troubleshooting story: payment gateway calls fail at lunchtime peak → SNAT metrics → a new HttpClient is created for every request → switch to a singleton and add a NAT Gateway.
Common wrong answers
“Just add nodes.” That only helps if the hot spot is spread out, and it hides the application problem.
Q18. How do you protect the API server? How do you choose between authorized IP ranges, a private cluster, and API Server VNet integration? Advanced
30-second answer
Authorized IP ranges: the simplest option. The API stays on a public endpoint, but only allow-listed egress addresses can reach it (#18). Private cluster: the API server is reached through a private endpoint in your VNet, with no public access. You need a private DNS zone and an access path (jump box, VPN, or self-hosted runner; #19, #20). API Server VNet integration: the API server is projected directly into a delegated subnet in your VNet (ILB). No tunnel is needed between the nodes and the API server, and you can switch between public and private (turning off private cluster is currently in preview). Whichever you choose, combine it with Entra and disabled local accounts.
Deeper answer
Option
Advantages
Trade-offs
Authorized IP
No network changes needed
Managing egress IPs; hard to use with hosted CI
Private cluster
No public attack surface
Complex DNS and access paths; portal access is restricted
VNet integration
No tunnel, can switch
Needs a delegated subnet and address planning
Common follow-up questions
How do you deploy from CI to a private cluster? Use a self-hosted runner inside the VNet, az aks command invoke, or a GitOps pull model.
Bonus points
Be able to explain the typical exit 52 failure on a private cluster (#5) and the DNS zone link conflict (#20).
Q19. What ingress options does AKS have? What does the retirement of Ingress-NGINX mean for you? Intermediate
30-second answer
Options: the application routing add-on (managed NGINX, which also provides a Gateway API implementation), Application Gateway for Containers (AGC, an Azure-managed L7 service that supports Gateway API), AGIC (legacy), and self-installed controllers (Envoy Gateway, the Istio add-on gateway, and so on). Upstream Ingress NGINX ended maintenance in 2026-03. Microsoft provides critical security patches for the NGINX in the application routing add-on only until 2026-11. Start planning the move to Gateway API now (the application routing Gateway API implementation or AGC).
Deeper answer
Migration steps: inventory the Ingress resources and NGINX annotations → create a Gateway and HTTPRoute for each domain and run them in parallel → switch DNS → decommission the Ingress.
Many NGINX annotations (rewrite, snippet) need filters or implementation-specific extensions in Gateway API.
Common follow-up questions
Where does the WAF go? AGC, Application Gateway, or Front Door provides a WAF in front of the ingress.
Bonus points
Point out that configuration-snippet-style annotations have caused security problems, and that Gateway API's role separation (infrastructure, cluster operations, application development) suits multi-team platforms better.
Common wrong answers
“Kubernetes deletes Ingress resources.” What is retired is the Ingress NGINX controller project, not the Ingress API.
Q20. How do you design network policies on AKS? Intermediate
30-second answer
Engines: Cilium (recommended, comes with the Cilium data plane), Calico, and Azure NPM (Linux retired on 2028-09-30). Design: default-deny inbound in each namespace (and outbound too, if needed) → explicitly allow DNS (#23) → allow service-to-service calls by application labels → allow the ingress controller namespace to reach the backends → use FQDN policies (Cilium/ACNS) or a firewall for outbound traffic to external services.
The network policy engine is chosen when the cluster is created. Changing it requires a migration that follows the docs.
Testing: a matrix of kubectl exec plus curl, or observability tools (Hubble or ACNS flow logs).
Common follow-up questions
How do network policies differ from NSGs? NSGs work at the IP layer on subnets and NICs, and they do not understand Pod labels. Network policies are based on Kubernetes identity (labels).
Bonus points
Remind people that hostNetwork Pods are not subject to policy, and mention the Cilium ipBlock limitation (Q15).
Common wrong answers
“Everything works fine after default-deny outbound.” You forgot DNS.
Q21. Explain DNS on AKS. How do CoreDNS, custom DNS, and private DNS zones work together? Advanced
30-second answer
A Pod's resolv.conf points to the kube-dns Service (for example 10.0.0.10, CoreDNS). CoreDNS resolves names inside the cluster, and other names are forwarded to the upstream DNS configured for the VNet (by default Azure DNS at 168.63.129.16, or a custom DNS server). Private endpoints (ACR, Key Vault, the private cluster API) depend on Azure private DNS zones. A custom DNS server must conditionally forward the privatelink zones to 168.63.129.16, and its VNet must be linked to those zones.
Deeper answer
Custom CoreDNS: change only the coredns-custom ConfigMap (to forward specific domains or add hosts). Do not edit the managed coredns ConfigMap.
Performance: ndots:5 amplifies external domain queries. You can set dnsConfig.options ndots on the Pod and evaluate LocalDNS (node-local cache).
Common follow-up questions
What does exit 52 during node bootstrap on a private cluster mean? The node cannot resolve the API server's privatelink name (#5).
Bonus points
Draw the full path: Pod → CoreDNS → VNet DNS (hub forwarder) → 168.63.129.16 → private DNS zone.
Q22. With Entra integration, how do you choose between Kubernetes RBAC and Azure RBAC for Kubernetes? Intermediate
30-second answer
Both use Entra authentication. Kubernetes RBAC: bind an Entra group object ID with a RoleBinding inside the cluster. It is flexible (you can bind custom Roles), but it is spread across each cluster. Azure RBAC: authorization through Azure role assignments (cluster or namespace scope). It is managed centrally in Azure, can be governed with PIM and Azure Policy, and is consistent across clusters. It has 4 built-in roles (RBAC Reader, Writer, Admin, and Cluster Admin), and custom roles are also supported. For platform-scale operations, Azure RBAC is usually the choice (it is preconfigured in AKS Automatic).
Deeper answer
az role assignment create --assignee <groupId> --role "Azure Kubernetes Service RBAC Writer" --scope $AKS_ID/namespaces/shop
Both can coexist. When Azure RBAC is enabled, RoleBindings inside the cluster still take effect (the authorization chain checks them in order).
The Cluster User Role is only used to download the kubeconfig (#29).
Common follow-up questions
How do you authorize service accounts? Service accounts still use Kubernetes RBAC.
Bonus points
Mention role assignment propagation delays, and the token group overflow problem caused by exceeding the group count limit.
Common wrong answers
“Azure RBAC Contributor lets you run kubectl on every resource.” You need data-plane roles.
Enable the OIDC issuer and Workload Identity on the cluster. Pods carry the label azure.workload.identity/use: "true" and use a ServiceAccount annotated with the client ID. The webhook injects environment variables and a projected SA token (audience api://AzureADTokenExchange). The SDK sends the token to Entra. Entra verifies the signature with the issuer's public key, then matches the issuer, subject (system:serviceaccount:ns:sa), and audience against the federated credential on the managed identity (or app registration). On success, it returns an access token. No long-lived secrets are involved at any point.
Deeper answer
Failures fall into two types: Entra never receives the request (labels or SA, #33), or the match fails (AADSTS700213, #32).
An identity can have a limited number of federated credentials (check the docs for the exact limit). If several clusters share the same identity, watch that limit.
Difference from Pod Identity (deprecated): it no longer depends on NMI intercepting IMDS.
Common follow-up questions
Why does it fail after the cluster is rebuilt? The issuer URL changed.
Bonus points
You can draw an analogy to GitHub Actions OIDC sign-in to Azure. Both use Entra federated credentials.
Common wrong answers
“Workload Identity mounts the managed identity's secret into the Pod.”
Q24. How do applications use secrets in Key Vault? How do you choose between the CSI driver and direct SDK access? Intermediate
30-second answer
Key Vault secrets store CSI driver (add-on azure-keyvault-secrets-provider): mounts secrets as files when the Pod starts. It can optionally sync them to a Kubernetes Secret and rotate them automatically. No application code changes are needed, which suits legacy applications and certificates. Direct SDK access (Workload Identity + Key Vault SDK): reads on demand, picks up new versions in real time, and never writes to disk, which suits new applications. Both should use Workload Identity rather than the kubelet identity or keys.
Deeper answer
Syncing to a K8s Secret puts the secret into etcd. It is encrypted, but RBAC must be tightened.
Rotation: after the CSI rotation interval expires, the mounted file is updated. The application must be able to re-read it. The environment variable approach does not get updated.
Common failures: #34 (SecretProviderClass, identity, network, permissions).
Common follow-up questions
What about External Secrets Operator? It is an option for multi-cloud or multi-backend setups, but it is a self-managed component.
Bonus points
Emphasize the availability coupling that “Pod startup depends on Key Vault being available”, and private endpoint DNS.
Q25. How do you implement image supply chain and runtime security on AKS? Advanced
30-second answer
Build: scan for vulnerabilities in CI, generate an SBOM, and sign images (Notation or Cosign). Store: a private ACR (Premium with a private endpoint), AcrPull for the kubelet identity, and immutable tags. Admission: the Azure Policy add-on restricts images to your own ACR and blocks privileged containers. Deployment Safeguards (Warn/Enforce). Image integrity verification of signatures (preview). Runtime: Microsoft Defender for Containers (vulnerability assessment, runtime threat detection), and a node OS auto-patch channel.
Deeper answer
Roll policies out in audit/Warn first, then deny/Enforce (#37). Configure exemptions for system namespaces so they don't block upgrades (#38).
Pod Security Standards: enforce baseline/restricted through Policy or PSA labels.
Common follow-up questions
How do you stop developers from using Docker Hub images directly? Use an allowed-registries policy plus ACR cache rules (Artifact Cache) to bring in upstream images.
Bonus points
Be clear about the boundary between “detect” and “block”. Defender finds problems, Policy and admission block them, and the two complement each other.
Common wrong answers
“If the scan passes, it is secure.” This misses admission and runtime controls.
Figure 6-1: use five lines of defense to organize answers about networking and security
Scenario question 6-1: IP planning for a 200-node cluster
The company gives you a /20 subnet in the VNet for AKS. The target is at most 200 nodes with up to 50 Pods per node, and the Pods do not need to be reached directly from the on-premises network. Choose the network model and give the CIDRs.
Key points of the reference answer
A flat static CNI needs 200 × 51 ≈ 10,200 IPs, and a /20 (4,091 usable) is not enough. So choose Overlay: a /20 node subnet is enough for 200 nodes plus surge plus ILB.
The Pod CIDR should be at least /16 (256 /24 blocks, enough for 200 nodes plus surge), and it must not overlap with any company address. The Service CIDR, for example 10.0.0.0/16, must also be checked against the VNet and peered networks (#13), and the DNS IP must be inside it (#14).
Data plane: Cilium. Outbound: NAT Gateway or firewall.
Scenario question 6-2: the security team requires “no public endpoint on the cluster, and Pods must access Key Vault without keys”
Provide an architecture and a CI/CD plan.
Key points of the reference answer
A private cluster or API Server VNet integration (no public access). Custom DNS in the hub forwards the privatelink zones. Outbound UDR → Azure Firewall (allow the AKS FQDN tag).
Workload Identity + Key Vault private endpoint + Key Vault Secrets User. Disable local accounts. Use Azure RBAC.
CI/CD: GitOps (Flux extension, pulling from inside the cluster) or a self-hosted runner inside the VNet. ACR Premium with a private endpoint.
Risk points: #5, #19, #20, #27, #34.
Video lessons (titles and channels verified with YouTube oEmbed)
8 minutesCA · NAP · surge · maintenance window13 questions
Learning goals
Explain the three layers of scaling (Pod replicas, Pod size, nodes) as one closed loop, and state how they depend on each other. Requests are the prerequisite for all of them.
Be able to design an upgrade strategy: the control plane and node pools, the two tracks of Kubernetes version and node OS image, auto-upgrade channels and maintenance windows, and surge, maxUnavailable, and blue-green.
Be able to describe an operations loop: metrics, logs, and control plane logs → alerts → diagnostic tools → backup and restore → cost governance.
Skim the questions and the points each one tests, and mark the ones you're not sure about. Click a row to jump to the detailed answer.
Q26. How does the Cluster Autoscaler decide when to scale up and down? What are the key parameters? Intermediate
30-second answer
Scale up: CA finds Pods that are Pending because of insufficient resources. For each node pool with CA enabled, it simulates adding one node from the template. It scales up only if the Pod would fit and maxCount has not been reached. When several pools are eligible, the expander (such as random, least-waste, or priority) decides. Scale down: when a node's utilization (the sum of requests) stays below the threshold for a period, and all Pods on it can be moved safely (PDBs, local storage, non-controller Pods, and annotations that block it), the node is deleted. AKS exposes parameters such as scan-interval, scale-down-unneeded-time, scale-down-utilization-threshold, and expander through the cluster-level autoscaler profile.
Deeper answer
az aks update -g $RG -n $CLUSTER --cluster-autoscaler-profile scan-interval=30s scale-down-unneeded-time=10m expander=least-waste
az aks nodepool update -g $RG --cluster-name $CLUSTER -n apps --update-cluster-autoscaler --min-count 2 --max-count 20
Common follow-up questions
Why doesn't it scale up even at 100% CPU? CA does not look at utilization. It only looks at Pending Pods. High utilization is handled by HPA adding replicas, and CA is triggered only when those replicas go Pending (#39).
Bonus points
Mention the CA status ConfigMap, the NotTriggerScaleUp event, and the cluster-autoscaler logs in diagnostic settings.
Q27. What is the difference between Node Auto Provisioning (NAP) and Cluster Autoscaler? When should you use NAP? Advanced
30-second answer
NAP is AKS's managed Karpenter. It does not need predefined node pool specs. Instead, based on the requests, affinity, taints, architecture, and Spot/on-demand constraints of Pending Pods, it picks a size from the allowed VM SKUs and creates a single VM directly (a NodeClaim). It also actively consolidates workloads onto fewer or cheaper nodes. CA can only add or remove nodes of the same size within predefined node pools. NAP suits clusters with varied workload shapes that want automatic sizing and cost reduction (it is the default in AKS Automatic). Limitations: no Windows, no IPv6, no service principals. NAP clusters cannot be stopped, and their outbound type cannot be changed.
Deeper answer
az aks create … --node-provisioning-mode Auto --network-plugin azure --network-plugin-mode overlay --network-dataplane cilium
kubectl get nodepools.karpenter.sh; kubectl get aksnodeclasses; kubectl get nodeclaims
Configure it with Kubernetes NodePool (requirements, limits, disruption budgets) and AKSNodeClass (image, OS disk). Do not manage NAP nodes with az aks nodepool scale.
Common follow-up questions
How are NAP nodes upgraded? They follow the control plane version and node image, and they are replaced according to the disruption rules. Configure an auto-upgrade channel and a maintenance window.
Bonus points
Mention the node count ceiling set by the Overlay Pod CIDR (#43), and the impact of consolidation on stateful workloads (PDBs, do-not-disrupt).
Q28. What problem does each of HPA, KEDA, and VPA solve? Can they be used together? Intermediate
30-second answer
HPA: adjusts the replica count based on CPU/memory or custom metrics. KEDA (AKS add-on): event-driven, scales on queue length, Service Bus, Kafka, Prometheus queries, and so on. It can scale to zero, and it generates an HPA under the hood. VPA (AKS add-on): recommends or adjusts requests based on historical usage. Do not let HPA and VPA both act on the same workload based on CPU/memory. A common combination is VPA in recommendation-only mode (Off), HPA or KEDA for replicas, and CA or NAP for nodes.
Deeper answer
KEDA authentication uses Workload Identity (azure-workload). From 2.15 onward, Pod Identity is no longer supported (#44).
The cold-start latency of scale-to-zero must be acceptable to the business.
Common follow-up questions
HPA shows unknown? metrics-server or the external metrics API (KEDA metrics-apiserver) is unavailable.
Bonus points
Chain the three layers of scaling together: accurate requests (VPA) → replicas scale up (HPA/KEDA) → Pods go Pending → nodes scale up (CA/NAP).
Common wrong answers
“Turn on VPA Auto mode in production without thinking.” It recreates Pods, so it needs PDBs and evaluation first.
Q29. How do you use Spot node pools safely on AKS? Intermediate
30-second answer
A Spot pool (--priority Spot --eviction-policy Delete --spot-max-price -1) is cheap but can be reclaimed at any time, with about 30 seconds' notice. It automatically gets the taint kubernetes.azure.com/scalesetpriority=spot:NoSchedule. Only put interruptible workloads on it (batch jobs, stateless retryable work, CI runners). Add tolerations and a node affinity that prefers Spot, and keep an on-demand pool as a fallback. Use PDBs and multiple replicas. Never use it as a system pool.
Q30. Describe the full AKS cluster upgrade process and its key parameters. Intermediate
30-second answer
Upgrade the control plane first (it is managed, so the API is briefly not writable and latency increases). Then roll through the node pools one by one: create surge nodes according to maxSurge → cordon and drain the old nodes (subject to PDBs and drain-timeout) → reimage or replace → optional soak wait → next batch → delete the surge nodes. Key parameters: --max-surge (default 1; can be a number or a percentage), --max-unavailable (default 0; in-place upgrades need no extra capacity), --drain-timeout (default 30 minutes; 5 minutes to 24 hours), and --node-soak-duration.
Deeper answer
az aks get-upgrades -g $RG -n $CLUSTER -o table
az aks upgrade -g $RG -n $CLUSTER --kubernetes-version 1.37.1 --control-plane-only --yes
az aks nodepool update -g $RG --cluster-name $CLUSTER -n apps --max-surge 33% --drain-timeout 45
az aks nodepool upgrade -g $RG --cluster-name $CLUSTER -n apps --kubernetes-version 1.37.1
After a failure, fix the root cause, then re-run the same upgrade command to continue from where it stopped (#8, #12).
Pre-flight checks reject unsatisfiable PDBs (#9) and cases that use APIs about to be removed (Q34).
Common follow-up questions
How large should maxSurge be? Larger means faster, but it needs more quota and IPs. In production, around 33% or a fixed number is common. Calculate it from your quota and subnet headroom (#1, #10).
Bonus points
Mention the maxUnavailable fallback (preview): if surge capacity cannot be obtained, fall back to surge 1, and then to an in-place upgrade.
Common wrong answers
“You can roll an upgrade back to the old version.” The control plane cannot be downgraded (Q32).
Q31. How do the auto-upgrade channel, the node OS upgrade channel, and the scheduled maintenance window work together? Intermediate
30-second answer
These are two independent tracks. The Kubernetes version is controlled by the cluster auto-upgrade channel (none, patch, stable, rapid, or node-image (legacy); new Standard clusters default to none). Node OS images and patches are controlled by the node OS upgrade channel (None, Unmanaged, SecurityPatch, or NodeImage; new Standard clusters default to NodeImage, with a new image every week). Both use a scheduled maintenance configuration to set their windows: aksManagedAutoUpgradeSchedule and aksManagedNodeOSUpgradeSchedule. A common production setup: stable (or patch) + NodeImage or SecurityPatch + a weekend window.
Deeper answer
az aks update -g $RG -n $CLUSTER --auto-upgrade-channel stable --node-os-upgrade-channel NodeImage
az aks maintenanceconfiguration add -g $RG --cluster-name $CLUSTER -n aksManagedAutoUpgradeSchedule \
--schedule-type Weekly --day-of-week Saturday --interval-weeks 1 --start-time 02:00 --duration 6 --utc-offset -05:00
SecurityPatch reimages only when necessary, and it may incur extra VHD storage charges. Unmanaged relies on the OS's own unattended-upgrades, and needs kured to handle reboots.
AKS Automatic: stable channel + NodeImage, preconfigured.
Common follow-up questions
How do you batch upgrades across many clusters? Use Fleet Manager update runs (Q41).
Bonus points
Point out that platform-initiated upgrades do not respect maintenance windows (Q8).
Common wrong answers
“If you turn on the node-image channel, the Kubernetes version will also be upgraded.”
Q32. How do you roll back when an upgrade goes wrong? How do you do a blue-green node pool upgrade? Advanced
30-second answer
The control plane cannot be downgraded, and a node pool cannot be moved to a lower Kubernetes version either. So “rollback” has to be designed in. ① Validate in pre-production first. ② Node pool blue-green: create a new node pool (green) with the same configuration on the new version, then cordon and drain the old pool (blue) to move workloads over. After observing, delete the blue pool. If there is a problem, uncordon and move the workloads back to blue. ③ Cluster-level blue-green: a new cluster plus a traffic cutover (Front Door, Traffic Manager, or DNS), which allows a full rollback. For node image problems, you can pin a known-good image using node pool snapshots.
Deeper answer
az aks nodepool add -g $RG --cluster-name $CLUSTER -n appsv2 --kubernetes-version 1.37.1 --node-count 3 --zones 1 2 3
for n in $(kubectl get nodes -l agentpool=apps -o name); do kubectl cordon $n; done
for n in $(kubectl get nodes -l agentpool=apps -o name); do kubectl drain $n --ignore-daemonsets --delete-emptydir-data; done
# After observing: az aks nodepool delete -g $RG --cluster-name $CLUSTER -n apps
Common follow-up questions
What does blue-green cost? Double the capacity (quota, IPs, cost) and extra migration time. For stateful apps, there are also the disk zone constraints.
Bonus points
For a cluster-level blue-green, prepare in advance: add the Workload Identity federated credential to the new cluster (#32), set up ACR authorization, DNS, and certificates.
Common wrong answers
“Specify an older version in az aks upgrade to roll back.”
Q33. How do you design PDBs so that clusters stay upgradable? Intermediate
30-second answer
A PDB should protect availability while always allowing at least one disruption: at least 2 replicas, maxUnavailable: 1 (or a percentage), combined with topology spread so replicas are not on the same node or availability zone. Avoid maxUnavailable: 0 or a minAvailable equal to the replica count. The first is rejected outright (#9), and the second leaves upgrades half-finished (#8). A single-replica application should either accept a short interruption (no PDB) or be changed to run multiple replicas.
Q34. What do you do when an upgrade is blocked by the deprecated API usage check? Advanced
30-second answer
Before a control plane minor version upgrade, AKS checks whether any client has recently called an API that the target version will remove. If so, it returns Bad Request: “Control Plane upgrade is blocked due to recent usage of a Kubernetes API deprecated in the specified version … set enable-force-upgrade in upgradeSettings.overrideSettings”. The correct approach is to find and migrate the callers (manifests, Helm release records, old operators, monitoring agents). Only after confirming the risk should you use --enable-force-upgrade --upgrade-override-until to bypass the check temporarily (default window: 3 days).
Deeper answer
az aks upgrade -g $RG -n $CLUSTER --kubernetes-version 1.37.1 --enable-force-upgrade --upgrade-override-until 2026-11-20T13:00:00Z
Locating the source: in the portal, go to Diagnose and solve problems → Kubernetes API deprecations. Control plane audit logs can be counted by userAgent.
A platform-initiated upgrade does not stop because of this check.
For old APIs left in Helm releases, see Helm Hour, #48 (helm-mapkubeapis).
Common follow-up questions
What happens after you bypass it? Clients that call the removed API will fail.
Bonus points
In CI, validate manifests against the target version with tools such as kubeconform or pluto.
Common wrong answers
“Just force the upgrade. The APIs are compatible anyway.”
Q35. How do you set up observability for AKS? Intermediate
30-second answer
Metrics: Azure Monitor managed Prometheus (Azure Monitor workspace) plus managed Grafana. Logs: Container Insights (Log Analytics; container stdout, events, and manifests). Control plane logs: diagnostic settings export categories such as kube-apiserver, kube-audit-admin, and cluster-autoscaler. Platform events: Activity Log and Resource Health. Alerts: node NotReady, Pending Pods, CA failures, SNAT, CoreDNS errors, and certificate or version expiry.
Deeper answer
az aks update -g $RG -n $CLUSTER --enable-azure-monitor-metrics --azure-monitor-workspace-resource-id <amwId> --grafana-resource-id <grafanaId>
az aks enable-addons -g $RG -n $CLUSTER -a monitoring --workspace-resource-id <lawId>
az monitor diagnostic-settings create -n aks-cp --resource $AKS_ID --workspace <lawId> --logs '[{"category":"kube-audit-admin","enabled":true},{"category":"cluster-autoscaler","enabled":true}]'
Cost control: kube-audit is very large, so prefer kube-audit-admin. For Container Insights, filter collection by namespace and use the basic logs tier.
Manage the workspace with IaC and lock it (#49).
Common follow-up questions
Prometheus details? See Hour 3 of the Prometheus & Grafana course.
Bonus points
Distinguish “cluster state” from “Azure platform events”. Many AKS failures (quota, Policy, throttling) appear only in the Activity Log.
Common wrong answers
“Turning on Container Insights gives you control plane logs.”
Q36. What is your troubleshooting methodology and toolkit for AKS? Intermediate
30-second answer
Start by layering: the Azure control plane (did the ARM/RP operation fail? az aks operation show-latest, Activity Log, error codes) → nodes (Ready? CSE? VMSS status) → Kubernetes (events, scheduling, admission) → networking (by direction: client to API, API to nodes, Pod to external, Pod to Pod, external to Pod) → the application. Tools: the portal's Diagnose and solve problems, kubectl debug node/…, az aks command invoke (private clusters), az aks kollect (log collection), az aks check-acr, node tcpdump or node-shell, and the error code index in Microsoft's troubleshooting docs.
Deeper answer
kubectl debug node/aks-nodepool1-…-vmss000000 -it --image=mcr.microsoft.com/azurelinux/busybox:1.36
kubectl get events -A --field-selector type=Warning --sort-by=.lastTimestamp
Common follow-up questions
When should you open a support ticket? For VMSS or platform-layer anomalies, and for unexplained control plane behavior. Include the cluster resource ID, the UTC time, and the relevant correlation ID (recommended in the docs).
Bonus points
Stress “fix the root cause before reconciling; don't loop on retries”.
Q37. How do you do backup and restore on AKS? Intermediate
30-second answer
Cluster configuration itself should be rebuildable from IaC and GitOps ("clusters are cattle"). What needs backing up is state: persistent volumes and key Kubernetes resources. Tools: Azure Backup for AKS (a backup extension and backup vault that snapshot Azure Disk PVs and resources, and can restore across regions), or Velero (self-managed). For databases, prefer the native backup of managed services (Azure SQL, PostgreSQL). Rehearse restores regularly (RTO/RPO).
Deeper answer
Azure Backup for AKS requires a cluster extension, Trusted Access, and a storage account. Selection by namespace or label is supported (check the docs for details).
etcd is managed by Microsoft, and you cannot back it up directly. That is why resource-level backup is needed.
Common follow-up questions
How do you back up Azure Files volumes? Use Azure Files' own share snapshots or backup.
Bonus points
Combine this with multi-region DR (Q44). Backup solves “data loss”, while multiple clusters solve “region unavailable”.
Common wrong answers
“AKS backs up etcd automatically, so you don't need backups.”
Make costs visible before optimizing. Enable the cost analysis add-on (it requires Standard or Premium, #50) to allocate costs by namespace. Then: right-size requests (VPA recommendations) → improve bin-packing (NAP consolidation or CA parameters) → choose the right VM series and Arm nodes → run interruptible workloads on Spot → stop and start dev clusters, or scale them to 0 → cover the stable baseline with reserved instances or savings plans → reduce log collection volume → optimize outbound and cross-zone traffic.
Deeper answer
Idle requests are the largest waste: requesting 4 cores but actually using 0.3.
Don't make system pools too large. Set the GPU pool minimum to 0.
Common follow-up questions
How do you prove you saved money? Use monthly trends by namespace or label from cost analysis, plus unit cost (per request or per tenant).
Bonus points
FinOps perspective: attribute costs to teams (showback or chargeback), together with quotas and policies.
Common wrong answers
“Downgrade the Standard tier to Free.” Production loses its SLA, and the savings are small.
Figure 7-1: the two main diagrams for operations interviews
Scenario question 7-1: an upgrade strategy for 12 production clusters
Cluster versions range from 1.34 to 1.36, some teams have strict PDBs, and quota is tight. Give a 3-month plan.
Key points of the reference answer
Inventory: Resource Graph lists versions and EOL dates (1.34 expires in 2026-11, the top priority), node pool skew (#7), PDB health check (#8, #9), deprecated APIs (Q34), and quota and subnet headroom (#1, #10).
Mechanism: enable the stable or patch channel, NodeImage, and maintenance windows on all clusters. Use Fleet Manager to stage the rollout (dev → staging → prod groups, Q41).
Tight quota: use a small maxSurge with a maxUnavailable fallback or in-place upgrades. Use blue-green for critical pools.
Communication: give application teams a PDB standard and a deadline, and remind them that platform-initiated upgrades get past PDBs.
Scenario question 7-2: scaling is slow during a peak sale, and Pods stay Pending for more than 5 minutes
The cluster uses CA with a single D8s_v5 node pool and maxCount 50.
Key points of the reference answer
Break down the delay: HPA reaction → Pods Pending → CA scan (scan-interval) → VM allocation (capacity, #3) → CSE bootstrap → image pull (large images) → readiness probe.
Measures: scale ahead of time (raise min-count in a planned way, or use a KEDA cron), overprovision (low-priority placeholder Pods), use multi-SKU node pools or NAP, slim down images and pre-pull them, and check quota and subnet headroom.
Scenario question 7-3: the monthly cost of the dev environment is 3 times over budget
10 dev clusters running 24×7, each on the Standard tier with 3 D8 nodes.
Key points of the reference answer
Consolidate into a few shared dev clusters with namespace isolation. Stop them outside working hours (or scale the user pool to 0). Use the Free tier for dev clusters, since no SLA is acceptable there. Use a Spot user pool, right-size requests, and narrow the Container Insights collection scope. Keep one Standard-tier cluster for measuring cost with cost analysis.
Video lessons (titles and channels verified with YouTube oEmbed)
Answer open-ended design questions using the structure “requirements → constraints → design → trade-offs → risks and validation.”
Be able to combine the components from the first 7 hours into a platform: landing zone, cluster template, namespace self-service, GitOps, phased Fleet updates, and policy and cost governance.
Be able to walk through a complete incident review (timeline, root cause, fix, prevention).
Skim the questions and the points each one tests, and mark the ones you're not sure about. Click a row to jump to the detailed answer.
Q39. What should you consider when deploying AKS in an enterprise landing zone (hub-spoke)?Advanced
30-second answer
One spoke per workload (separate subscription/VNet), peered with the hub. The hub provides Azure Firewall (outbound UDR + AKS FQDN rules), DNS forwarders (conditional forwarding for privatelink zones), VPN/ExpressRoute, and a Bastion/jump box. In each spoke: AKS (private or VNet-integrated), private endpoints for ACR and Key Vault, and NAT or UDR for outbound traffic. Governance: Azure Policy (the built-in AKS policy set), resource provider pre-registration (#2), quotas, the policy exemption list (#36), and diagnostic settings sent to one central workspace.
Deeper answer
Common pitfalls: #5 (DNS), #17 (firewall rules), #20 (DNS zone link conflicts), #21 (permissions on self-managed zones), #27 (ACR private DNS).
Reference: the AKS accelerator in Azure Landing Zones / the AKS baseline reference architecture (the Microsoft Architecture Center is the authority).
Common follow-up questions
How does inbound traffic flow?Front Door/Application Gateway (WAF) → ingress controller (private LB), so a public LB never reaches the cluster directly.
Bonus points
Give an IP plan (Q47) and the boundaries of your IaC modules (Q43).
Common wrong answers
Only covers cluster parameters, not DNS and outbound traffic.
Q40. Multi-team, multi-tenant: namespace isolation or one cluster per team?Advanced
30-second answer
“Soft multi-tenancy” (multiple teams in the same organization) usually means a shared cluster + namespace isolation: namespace-level Azure RBAC, ResourceQuota/LimitRange, default-deny network policies, a Pod security baseline, a Workload Identity per team, and costs allocated by namespace. AKS also offers managed namespaces to simplify self-service. “Hard multi-tenancy” (untrusted tenants, compliance isolation, different upgrade cadences, sensitivity to noisy neighbors) uses separate clusters or separate node pools + taints.
Deeper answer
Risks of a shared cluster: a shared control plane (API rate limiting, CRD conflicts), cluster-level permissions, and one upgrade cadence for everyone.
Cost of multiple clusters: per-cluster system pools and management overhead, reduced with Fleet + IaC templates (Q41, Q43).
Common follow-up questions
How do you stop team A's Pods from landing on team B's node pool?Node pool taints + admission policies that enforce tolerations and node selectors.
Bonus points
Give a decision matrix: trust boundary, compliance, scale, upgrade cadence, cost.
Common wrong answers
“A namespace is a security boundary.” The kernel and the nodes are shared.
Q41. What problem does Azure Kubernetes Fleet Manager solve, and how do you do a phased upgrade?Advanced
30-second answer
Fleet Manager manages multiple AKS clusters as members: update orchestration (an update run upgrades the Kubernetes version or node image stage by stage and group by group; between stages you can wait or require approval, and update strategies can be reused), auto-upgrade configuration (triggers update runs for the whole fleet by channel), multi-cluster resource placement (ClusterResourcePlacement, based on the open-source KubeFleet), and multi-cluster load balancing. Typical setup: dev group → staging group → prod (grouped by region).
Deeper answer
During an update run, upgrading an individual cluster still follows that cluster's surge/PDB settings. If a cluster fails, the run stops at that stage; troubleshoot it (for example, #8) and then continue.
Don't turn on Fleet upgrades and the cluster's own auto-upgrade channel at the same time, to avoid conflicts (check the docs for the latest guidance).
Common follow-up questions
What if you don't have Fleet?A pipeline calls az aks upgrade across an environment matrix, and you implement the stages and gates yourself.
Bonus points
Combine with GitOps: Fleet handles the “cluster version,” and Flux/Argo CD handles the “cluster content.”
Q42. GitOps on AKS: Flux extension or Argo CD?Intermediate
30-second answer
Both use the pull model inside the cluster, which suits private clusters well (no need to reach the API server from outside, #19). Flux (AKS GitOps extension): installed, managed, and supported by Microsoft, configured with az k8s-configuration flux, can be rolled out at scale with Azure Policy, and suits the “platform baseline.” Argo CD: a powerful UI, ApplicationSets, multi-cluster management, and a broad ecosystem (AKS also offers an Argo CD extension; check the docs). Many platforms use Flux for the baseline and let application teams use Argo CD.
Q43. What are the pitfalls of managing AKS with Terraform/Bicep?Intermediate
30-second answer
Use Azure Verified Modules (AVM) as a starting point. Keep the cluster, identities and role assignments, networking, diagnostics, and maintenance configuration in one module's dependency chain (#21, #26). Pitfalls: a node_count managed by the cluster autoscaler causes drift → use lifecycle ignore_changes; a Kubernetes version changed by auto-upgrade → ignore it, or declare only the minor version; properties that can only be set at creation (network plugin, Service CIDR, availability zones, node resource group name) force a rebuild if changed; concurrent applies cause OperationNotAllowed (#11); and enabling the kubernetes/helm providers in the same state as the cluster creates a chicken-and-egg problem.
Q44. Design a multi-region high-availability / disaster-recovery AKS architecture.Advanced
30-second answer
One (or more) independent clusters per region, with configuration generated from the same IaC + GitOps set. For global entry, use Azure Front Door (or Traffic Manager) for health probing and failover; replicate ACR across regions; keep one Key Vault per region; for the data tier, choose managed services that support cross-region replication (Cosmos DB multi-region writes, Azure SQL failover groups); back up stateful PVs with Azure Backup for AKS and restore them across regions. Choose active-active or active-passive based on RTO/RPO.
Deeper answer
Within each region, still use availability zones (Q12).
Failover drills: periodically shift traffic to the standby region, and verify that Workload Identity federated credentials, DNS, and certificates work in both regions.
Common follow-up questions
Why not use one cross-region cluster?An AKS cluster is a regional resource, and its control plane lives in a single region.
Bonus points
Point out that the hardest parts are data consistency and split-brain, not Kubernetes.
Common wrong answers
“Enabling availability zones is disaster recovery.”
Q45. Design question: how do you make upgrades across 50 clusters zero-downtime and controlled?Advanced
30-second answer
Standardize, stage, gate, and keep a rollback path: all clusters use the same upgrade channel and maintenance window; use Fleet update runs to move through dev → staging → prod (grouped by region or business unit); run automated health checks between stages (nodes Ready, Pending Pods, error-rate SLO); enforce PDB, multi-replica, and probe standards on the application side; before upgrading, check quotas, subnets, deprecated APIs, and PDBs in bulk; use blue-green for critical pools; if something goes wrong, stop the run and troubleshoot.
Deeper answer
Pre-check list: #1 #6 #7 #9 #10, Q34 deprecated APIs, and old APIs in Helm release records.
Metrics: per-run duration, failure rate, and PDB block count, tracked as platform KPIs.
Common follow-up questions
What if a team refuses to upgrade?Explain the platform-initiated upgrade and the support policy; provide a compatibility test environment and a deadline; if necessary, use LTS (the cost is borne by the team).
Bonus points
Orchestrate node image updates (weekly) separately from Kubernetes minor version upgrades (quarterly).
Common wrong answers
“Upgrade all 50 clusters together on the weekend.”
Q46. Design question: design AKS for regulated workloads such as finance or healthcare.Advanced
30-second answer
Network: private cluster or API server VNet integration, no public inbound (private ingress behind WAF), UDR to the firewall, private endpoints for PaaS access. Identity: Entra + Azure RBAC, local accounts disabled, PIM break-glass, Workload Identity, no long-lived secrets. Data: customer-managed keys (KMS encryption for disks and etcd; check the docs), backup and retention policies. Admission and runtime: Azure Policy (Deny), Safeguards Enforce, PSS restricted, Defender for Containers, image signing. Operations: long-term retention of audit logs (kube-audit), LTS on the Premium tier for a longer version-stability window, and change windows.
Deeper answer
FIPS node pools (note the Azure Files mount restrictions, #46), and confidential computing nodes (if required).
Evidence: Policy compliance reports, Defender recommendations, and audit log queries as audit material.
Common follow-up questions
Does LTS mean you never have to upgrade?LTS also has an end date (24 months); the window is just longer.
Bonus points
Map each control to clauses in the compliance framework (such as access control, encryption, and logging).
Common wrong answers
Listing feature names without explaining what risk each one prevents.
Q47. Design question: plan addresses for a cluster expected to grow to 500 nodes.Advanced
30-second answer
Choose Overlay: the node subnet needs 500 + surge + headroom for internal LBs and private endpoints, so /22 (1,019 usable) is enough; the Pod CIDR is /24 per node, so 500 nodes need at least 500 /24s → /15 or larger (a /16 gives only 256, #43); the Service CIDR /16 and the DNS IP fit inside it (#14); all of the above must not overlap the VNet, peered networks, or on-premises networks (#13). If you use API server VNet integration, you need an extra delegated subnet.
Deeper answer
Comparison with a flat static CNI: 500 × (1+30) ≈ 15,500 IPs → at least /18, and hard to scale.
For large clusters, also consider: the Standard tier (Free tops out at 1,000 nodes but has no SLA), API rate limiting, CoreDNS scaling, and NAT Gateway outbound ports.
Common follow-up questions
Which address range do you use for Pod CIDRs?Pick a range that never appears in your enterprise network (such as a subset of 100.64.0.0/10 or a dedicated reserved RFC 1918 range), and register it in IPAM.
Bonus points
Give the formula and keep a 30% buffer.
Common wrong answers
“Pod CIDRs are virtual, so overlap doesn't matter.” Overlap with networks you need to reach causes routing errors.
Q48. Design question: your boss wants AKS costs cut by 40% next quarter. What do you do?Advanced
30-second answer
Week 1: build visibility (the cost analysis add-on, costs by namespace/team, utilization = usage / requests). Weeks 2–4: quick wins (stop or merge dev clusters, cut log collection, delete idle PVs and public IPs, set the GPU pool minimum to 0). Month 2: structural optimization (right-size requests, NAP consolidation or CA least-waste, Arm/newer-generation VMs, Spot for batch work). Month 3: commitment discounts (reserved instances or savings plans for the stable baseline). For each item, give the estimated savings and risks, and use SLOs to protect reliability.
Deeper answer
Common sources of waste: idle requests, oversized system pools, and 24×7 non-production environments are often the biggest items (use your actual bill; don't quote numbers from memory).
Common follow-up questions
How do you avoid cost cuts causing incidents?Change one variable at a time and watch the SLOs; use Spot only for interruptible workloads; keep PDBs in place.
Bonus points
Set up showback so teams are accountable for their own costs.
Q49. Tell us about an AKS production incident you handled (use intermittent failures of external calls as an example).Advanced
30-second answer
Use STAR + a timeline: symptom (at the lunchtime peak, 5% of calls to a partner API time out, while internal calls are fine) → hypotheses (DNS? partner rate limiting? outbound?) → evidence (only public targets are affected, correlated with specific nodes, LB SNAT failure metric > 0) → root cause (one service created a new HTTP client per request, exhausting SNAT ports on hot nodes, #16) → mitigation (add outbound IPs and ports, spread replicas) → permanent fix (connection pooling, switch to NAT Gateway, alert on SNAT metrics) → review (code review checklist, capacity model).
Deeper answer
The key is to show process of elimination: DNS is fine (dig succeeds), the partner returns no 429, and calls over private endpoints have no problems → this points to SNAT.
Tools: LB metrics, node conntrack/tcptracer (the Microsoft docs method), and correlated application logs.
Common follow-up questions
Why wasn't it caught earlier?There was no SNAT alert, and load testing did not cover external dependencies.
Bonus points
Quantify the impact (error rate, duration, affected users) and the improved metrics afterward.
Common wrong answers
Only saying “a restart fixed it,” with no root cause or prevention.
Q50. How would you assess moving the company platform to AKS Automatic?Advanced
30-second answer
Assess by gap: list the customizations on existing clusters (Windows nodes, privileged DaemonSets, custom CNI/networking, self-managed KEDA/ingress, Spot policies, node pool–level configuration), and compare each against Automatic's “preconfigured / default / optional” features. Run representative workloads on a pilot cluster to validate Safeguards Enforce, the impact of NAP consolidation on stateful apps, and the upgrade cadence. Weigh the organizational benefits (platform staffing, default security baseline) against the control you give up. The usual conclusion: “new workloads default to Automatic, special workloads stay on Standard.”
Deeper answer
Migration approach: new cluster + GitOps redeployment + traffic cutover (not an in-place conversion).
Risks: workloads rejected by Safeguards (#37), NAP limits (#43), and the ingress approach (Gateway API, #25).
Common follow-up questions
What is left for the platform team to do?Landing zone, identity and network integration, policy, cost, developer experience, and templates.
Bonus points
Give pilot success criteria (deployment failure rate, upgrades with no manual intervention, cost change).
Common wrong answers
“Automatic solves every operations problem automatically.”
Figure 8-1: you can expand the design question from this diagram
Scenario question 8-1: from 3 hand-built clusters to a platform
The company has 3 AKS clusters created by hand in the portal (kubenet, service principals, local accounts, no monitoring). Turn them into a platform within 6 months. Give a roadmap.
Key points of the reference answer
Risk ranking: SP secret expiry (#35), kubenet retirement (2028-03-31), version support, local accounts (#31), no monitoring.
Roadmap: ① IaC templates (AVM, Overlay + Cilium, managed identities, Entra + Azure RBAC, local accounts disabled, monitoring, maintenance windows); ② new clusters + GitOps to migrate workloads (safer than changing networking in place); ③ phased Fleet upgrades; ④ Policy and cost analysis; ⑤ namespace self-service and documentation.
Scenario question 8-2: on Monday morning, every new Pod in every cluster shows ImagePullBackOff
Over the weekend the security team “tightened the network.” Give the troubleshooting order.
Tools: az aks check-acr, nslookup/nc on a node, firewall deny logs, ACR network rules, and weekend changes in the Activity Log.
Prevention: network changes must include an AKS dependency list and be validated in pre-production.
Scenario question 8-3: design a “namespace as a service” for developers
Developers request a namespace through a form or PR, and the platform configures it automatically.
Key points of the reference answer
Inputs: the team's Entra group, cost center, quotas, and environments.
Automatically generated: the namespace (with labels), namespace-scoped Azure RBAC role assignments, ResourceQuota/LimitRange, default-deny network policies plus DNS allowance, Workload Identity identities and federated credentials, cost labels, and a GitOps directory. You can evaluate the AKS managed namespaces feature.
Guardrails: Policy/Safeguards; reclamation: automatically remind owners about unused namespaces, then delete them.
Video lessons (titles and channels verified with YouTube oEmbed)
No verified video that systematically covers AKS platform design interview questions was found. For whiteboard questions, prepare using the AKS baseline reference architecture from the Microsoft Architecture Center.
50 “error → first diagnostic command → common fix” · 50 one-line key-point cards · printable
After class
A · Quick reference for 50 production problems
Type a keyword to filter (for example Quota, CIDR, 401, PDB, DNS). Click a number to jump to the detailed explanation in the matching module.
B · 50 interview question flashcards
Try to recall the answer from the question first, then expand the card to check it against the one-line key point. For details, go back to the “interview question details” in the relevant module.
General command cards
Cluster and operation status
az aks show -g RG -n C --query "{v:kubernetesVersion,prov:provisioningState,power:powerState.code}"
az aks operation show-latest -g RG -n C # aks-preview
az aks operation-abort -g RG -n C
az aks update -g RG -n C --yes # reconcile Failed
az aks nodepool update -g RG --cluster-name C -n NP
az monitor activity-log list -g RG --status Failed --offset 2h
Versions and upgrades
az aks get-versions -l LOC -o table
az aks get-upgrades -g RG -n C -o table
az aks upgrade -g RG -n C --kubernetes-version V [--control-plane-only]
az aks nodepool upgrade … [--node-image-only]
az aks nodepool update … --max-surge 33% --max-unavailable 0 --drain-timeout 45
kubectl get pdb -A
Networking
az aks show … --query networkProfile
az aks update … --api-server-authorized-ip-ranges "IP/32"
az aks command invoke -g RG -n C --command "kubectl get pods -A"
kubectl get pods -n kube-system -l app=konnectivity-agent
kubectl get pods -n kube-system -l k8s-app=kube-dns
kubectl debug node/NODE -it --image=mcr.microsoft.com/azurelinux/busybox:1.36
Identity and ACR
az aks check-acr -g RG -n C --acr ACR.azurecr.io
az aks update -g RG -n C --attach-acr ACR
kubelogin convert-kubeconfig -l azurecli
kubectl auth whoami; kubectl auth can-i list nodes
az aks show … --query oidcIssuerProfile.issuerUrl
az identity federated-credential list -g RG --identity-name ID
8 mixed failure scenarios (look at the symptoms, make your own call, then expand the answer) · a full mock interview with 10 questions randomly drawn from 50 · final quiz
After class ≈ 40 minutes
Part 1 · Comprehensive failure drills
Each scenario combines several problems from Part A. First write down your first diagnostic command and your judgment, then expand the answer.
Scenario 1:During Saturday's maintenance window a node pool upgrade failed, and on Monday one node is SchedulingDisabled
$ az aks nodepool show … --query provisioningState → Failed
error: (UpgradeFailed) Drain node aks-apps-…-vmss000004 failed when evicting pod pg-0 … blocked by pdb pg-pdb with 0 unready pods.
$ kubectl get pdb -n data
pg-pdb MIN AVAILABLE 1 ALLOWED DISRUPTIONS 0 (StatefulSet has only 1 replica)
Answer:A single replica with minAvailable 1 → PodDrainFailure (#8). Confirm the acceptable disruption window with the data team, temporarily relax the PDB or add a replica, rerun the same upgrade command to resume from the point where it stopped, and then confirm Succeeded with az aks nodepool show. Prevention: PDB standards (Q33), a PDB check before upgrades, and Policy that rejects unsatisfiable PDBs (#9).
Scenario 2:Creating a private cluster in a new spoke fails
CSE failed with 'VMExtensionError_K8SAPIServerDNSLookupFail' … exit status 52
VNet DNS servers: [10.50.0.4] (the DNS forwarder in the hub)
The hub's DNS forwarder has no conditional forwarding for privatelink.canadacentral.azmk8s.io
Answer:Nodes fail to resolve the private FQDN of the API server using custom DNS (#5). Configure a conditional forward for azmk8s.io on the forwarder to 168.63.129.16, and link the DNS zone to the hub VNet. If you use a self-managed zone, confirm the cluster identity has Private DNS Zone Contributor (#21), and that no overlapping zone links exist (#20). After fixing it, retry the creation or run az aks update --yes.
Scenario 3:After moving outbound traffic to a NAT Gateway, every new Pod fails to pull images
Failed to pull image "acrprod.azurecr.io/shop/api:2.4": … failed to fetch anonymous token: unexpected status: 403 Forbidden
$ az acr show -n acrprod --query networkRuleSet.ipRules → only the old LB outbound IP
Answer:The outbound IP changed, and the ACR firewall rejected the traffic (#27). Add the NAT Gateway public IP to the ACR rules, or switch to an ACR private endpoint with private DNS. Add an “impact of outbound IP changes” checklist (ACR, third-party allow lists) to the change request template.
Scenario 4:After a blue-green cluster rebuild, the orders service fails to read from Key Vault
AADSTS700213: No matching federated identity record found for presented assertion subject 'system:serviceaccount:orders:orders-sa'
$ az identity federated-credential list … → the issuer is the OIDC URL of the old cluster
Answer:The new cluster has a different OIDC issuer URL, but the federated credential still points to the old cluster (#32). Add a federated credential for the new cluster (one identity can have several), and delete the old credential after the cutover. Prevention: have IaC compute the credential from cluster outputs, and include this step in the blue-green checklist (Q32).
Scenario 5:Overnight batch processing takes twice as long, with many Pending Pods, but the node count hasn't changed
Events: pod didn't trigger scale-up: 3 max node group size reached
$ az aks nodepool list … → batch pool max 10 / count 10
(after raising max) (QuotaExceeded) … exceeding approved standardDSv5Family Cores quota
Answer:First the CA ceiling (#39), and after raising the ceiling, the quota (#1). Short term: a Spot pool (separate quota) or another VM family; medium term: request a quota increase; long term: evaluate NAP choosing across multiple SKUs (Q27), and KEDA scaling on queue length.
Scenario 6:kubectl logs times out on half the nodes
Error from server: error dialing backend: dial tcp 10.10.1.37:10250: i/o timeout
The new node pool apps2 is in subnet snet-apps2, and the subnet NSG has a custom “DenyAllInbound” rule (priority 300)
Answer:The new subnet's NSG blocks port 10250 (#22), which can also block DNS between node pools (#23). Add a rule in the NSG that allows traffic between node subnets, with a higher priority than the deny. Prevention: a custom NSG baseline template.
Scenario 7:Trying to upgrade 1.35 → 1.36 is rejected; another cluster's upgrade fails before it even starts
Cluster A: Bad Request … Control Plane upgrade is blocked due to recent usage of a Kubernetes API deprecated in the specified version …
Cluster B: Error: Unable to get log analytics workspace info. … Code='ResourceGroupNotFound'
Answer:A: deprecated API detection (Q34). Find the callers and migrate them, and use --enable-force-upgrade only after confirming it's safe. B: the monitoring workspace was deleted (#49). Recover it within 14 days, or disable monitoring or switch to a new workspace and retry. Both are a reminder: if the cluster drifts past the support window, a platform-initiated upgrade will not stop for deprecated APIs.
Scenario 8:After enabling Deployment Safeguards Enforce, all of Monday's releases fail
admission webhook "validation.gatekeeper.sh" denied the request: [azurepolicy-…] container <api> has no resource limits
Helm: Error: UPGRADE FAILED: … denied the request …
Answer:Admission policy rejections (#37). Right away: switch Safeguards back to Warn, or exclude the business namespaces. Then: add requests/limits, probes, and similar settings to the charts, and use --dry-run=server in CI to catch problems early. Finally, switch namespaces to Enforce one at a time.
Part 2 · Full mock interview (10 questions randomly drawn from 50)
Two-minute countdown per question: answer out loud first (you can jot key points in the text box), then expand the reference answer and self-rate as “got it / partly / didn't know.” At the end, your score for the round is shown, along with your cumulative mastery rate by module. Self-assessment results are saved in this browser.
Part 3 · Open-ended self-check (6 questions)
Draw the steps of az aks create, and mark which step each of #1, #2, #4, #5, #10, #13, and #36 happens at.
Why do surge upgrades depend on quota, subnet IPs, and PDBs at the same time? Give one failure example for each, and a fix.
For each of the three directions (client → API server, API server → nodes, Pod → public internet), list two common failures and the first diagnostic command.
Compare #32 and #33: how do you use one command to tell whether Entra received the token exchange request?
For a “Pending Pods but no scale-up” case, what should you check on the CA and on NAP?
Write a one-page “AKS production readiness checklist” for your organization (at least 12 items, covering versions, networking, identity, scaling, observability, and cost).
Free (≤1,000 nodes, no SLA), Standard (SLA 99.95% with AZ / 99.9% without, ≤5,000 nodes, Pod readiness SLA), Premium (+ LTS); Automatic is preconfigured on Standard
NAP GA (CLI ≥ 2.76); not supported on Windows, IPv6, or SP; cannot be stopped; cannot change the outbound type; Automatic managed system pool and preconfigured features; Cilium limitations
Azure CLI 2.93.0 (GitHub release 2026-11-15); outbound-type values, --node-provisioning-mode, --enable-keda, etc. in az aks create --help; az aks operation show-latest needs aks-preview
All videos were verified on 2026-11-15 through the YouTube oEmbed endpoint (https://www.youtube.com/oembed?url=…&format=json) for titles and channels. oEmbed does not return durations or publish dates, so those are not listed. Verified: Azure Kubernetes Service (AKS) official channel, “Upgrade Issues 101 with Mosbah Majed” (PRDy-2h_r2E), “Diagnose & Solve with Andrew Scobie” (UdRzAdraWAE), “Troubleshoot Outbound connectivity Issues with Ping He” (CWnQ-nNi9Yw), “Troubleshooting DNS Issues with Qasim Sarfaraz” (10IQeDOtVqo), “Accessing a Private AKS Cluster Remotely” (W_LCkdnZsyY), “AKS Workload Identity - Quick Tutorial” (i2GobU0Wg48), “Troubleshooting AKS Scaling Issues with Jameson Hearn” (47Q4JbWxlm4), “Node Auto Provisioning with Wilson Darko” (LVgAolj3QGA), “Troubleshooting Disk Latency with Burak Ok” (YeO5zTDFtHA), “Troubleshooting OOM failures with Claudio Godoy” (whnksEP0yUI), “AKS Scalers Deep Dive - AKS Cost Management Series - Episode 8” (oILHg5hsZQ0), “What is AKS Automatic?…” (S5cJFJ719Hg), “AKS Networking: Best Practices Guide for Production” (mAGqnX2WW1M), “AKS Node Auto Provisioning (NAP) - Feature Overview” (1BCsuy35JKg), “AKS Node AutoProvisioning (NAP) is now Generally Available” (IWQSAcek5n4), “Azure Kubernetes Fleet Manager - Upgrading your fleet of clusters at scale” (owDjoZzs6Fw), “KubeFleet - Multi cluster management with Ryan Zhang” (foiv45fuRsM); John Savill's Technical Training: “Upgrading and Maintaining your Azure Kubernetes Service (AKS) Cluster” (soLCemusoE8), “Azure Kubernetes Service (AKS) Networking Deep Dive” (6TZsd4toIbg), “Azure Kubernetes Services (AKS) Overview” (c4nTKMU6fBU), “Azure Kubernetes Service (AKS) High Availability” (gksFrKiZjMc), “AKS Networking Update - Control plane, nodes and pod networking options!” (54y986U1uYM), “Azure Kubernetes Service (AKS) Network Isolated Mode” (MnavTrODRfk); Programming with Wolfgang: “How to use Entra Workload ID in Azure Kubernetes Service” (ZEn2Zh9o1hQ); Harshalkumar Jain: “Azure Container Registry (ACR) Explained | AKS Image Pull From ACR With Managed Identity | Part-5” (FtZTm58wgMc); Luke Murray: “Security Best Practices for Azure Kubernetes Services (AKS)” (S-WlcOuzQNQ); Houssem Dellai: “AKS Egress Traffic and Outbound Types” (V2E1WNR-4KM), “Optimise AKS cost” (Ncouc5xXp4Q); Lionel Gurret: “AKS Cost Optimization Basics” (e0gE6NJpfRg). Not found: a verified video that specifically covers Key Vault CSI mount failures, Deployment Safeguards troubleshooting, or AKS interview questions; the related sections provide a storyboard script or a note instead.
Voice notes
The “Voice” tab uses the browser's built-in Web Speech API and does not upload any data. You need an English (en-US) voice pack installed on the system; without one, you can read the script directly.
Known limitations
The error messages in the Part A titles are taken from the Microsoft AKS troubleshooting docs (angle brackets are placeholders from the docs). The docs themselves have wording differences (for example, “2 versions” vs “3 versions” in NodePoolMcVersionIncompatible), and messages returned by kubectl, Gatekeeper, the Azure SDK, or Entra change between versions; entries are marked “wording may vary.” The full messages for #15, #33, #37, and #38 are not given in the docs.
All “expected output” blocks are examples. The reproduction labs are written against the 2026-11 docs and az aks create --help, and were not actually run in this environment (there is no Azure subscription). Some results depend on subscription state (quota, current version, image cache); the lab steps note this. Costs are example estimates; use the Azure pricing calculator.
Points handled conservatively (not hard-coded, or deferred to the docs): prices for each pricing tier; the default number of SNAT ports per LB node; the wait time for forced detachment of Azure Disks; the rules for combining Fleet auto-upgrade with the cluster auto-upgrade channel; specific prerequisites for Azure Backup for AKS; the versions of the KEDA/VPA add-ons; the feasibility of Pod CIDR expansion; the syntax for clearing labels with az aks nodepool update --labels ""; the status of the Argo CD extension; the default kubelet maxPods.
Mock interview self-assessment records are stored only in this browser's localStorage, and will be lost if you clear site data.