AKS Hour 1: Core Fundamentals

From a platform engineer's point of view, this hour shows what AKS manages for you and what you still own: the control plane and responsibility boundaries, pricing tiers and version support, Standard vs. Automatic, node pools, Entra authentication, add-ons, and finally releasing myapp from ACR and running a readiness review
Kubernetes 1.36 (default for new clusters) / 1.37 (latest GA)Azure CLI 2.93.0AKS Standard + AKS AutomaticVerified against learn.microsoft.com and AKS release notes · 2026-11-15
Prerequisites This hour assumes you have finished the Kubernetes 8 + 1 hour crash course (Pods, Deployments, Services, RBAC, scheduling and taints) and the Docker 8-hour crash course (the myapp image). Hour 6 of the K8s course, Hour 6, already walked you through “running on AKS” in one lesson (creating aks-lab, Helm, upgrades, reference architecture). This hour does not repeat that introduction. Instead, it opens up the mechanics behind each default: what az aks create actually builds in Azure, who patches it, when versions expire, where the token comes from, and why the image can be pulled.
Overall learning goals
  • Draw the AKS architecture: the Azure-managed control plane (API server, etcd, scheduler, controller-manager, cloud-controller-manager) plus the node resource group MC_* in your subscription (VMSS, load balancer, managed identities, VNet). Explain the responsibility boundary between Microsoft and you, item by item.
  • Choose among the Free / Standard / Premium pricing tiers (SLA 99.95% / 99.9%, node limits, LTS). Read the AKS version calendar: N-2 community support, N-3 platform support, the 60-day grace period, LTS (1 year community + 1 year LTS), and platform-initiated upgrades starting 2027-06-01.
  • Create clusters with AKS Standard (you set every parameter) and AKS Automatic (--sku automatic, which pre-configures a managed system node pool, NAP, Cilium, Azure RBAC, and deployment safeguards). Be able to walk through the full path behind az aks create: ARM → AKS RP → control plane → MC_* → VMSS → kubelet registration → system components.
  • Design system and user node pools: the CriticalAddonsOnly=true:NoSchedule taint, the kubernetes.azure.com/mode label, and the minimum size and node count for the system pool.
  • Access the cluster with Microsoft Entra ID + Azure RBAC. Understand the kubelogin exec plugin in kubeconfig, --disable-local-accounts, and the break-glass procedure.
  • Tell apart the support boundaries and upgrade rules for add-ons, cluster extensions, and managed feature toggles.
  • Use --attach-acr (kubelet identity + AcrPull) to deploy myapp and Redis from ACR into the myapp namespace, then check the cluster against a readiness review checklist.

Hour 1 Timetable

#TimeModuleCore contentAnimation / interactiveLab (rg-aks-lab / aks-lab)
0Before classEnvironment setupAzure subscription and roles, Azure CLI 2.93, kubectl + kubelogin, resource provider registration, variables and costsEnvironment self-check listaz version, az provider register
100–06AKS architecture and responsibility boundariesManaged control plane, node resource group MC_*, node components, managed identities, shared responsibility modelResponsibility sorting gameIdentify three kinds of resources in an existing cluster
206–13Pricing tiers, support policy, and LTSFree/Standard/Premium, SLA, N-2 / N-3, platform-initiated upgrades, LTS, version skewVersion lifecycle calculatoraz aks get-versions, switching tiers
313–21Creating clusters: Standard and AutomaticParameter-by-parameter walkthrough, Automatic pre-configured items and limits, comparison of the two modesCore animation: what happens behind az aks create (Standard and Automatic paths)Create aks-lab (Standard) + optional aks-lab-auto
421–28Node pools: system and userModes, taints and labels, system pool sizing, adding/removing/changing pools, availability zonesScheduler simulator: taint toggle + Pod placementAdd userpool, add a taint to the system pool
528–35Accessing the cluster: Entra and kubeloginThree kubeconfig forms, exec plugin, four built-in Azure RBAC roles, disabling local accounts, break-glassThe full authentication and authorization path for one kubectl getAuthorization, converting kubeconfig, disabling local accounts
635–42Add-ons, extensions, and managed componentsadd-on vs extension vs feature toggle vs self-installed open source; upgrade rules; aks-managed Helm release“Who owns this?” classifierTurn on monitoring metrics, view managed components
742–50Deploying myapp: ACR integrationACR creation and builds, how --attach-acr works, check-acr, manifests, LoadBalancer publishingImage pull path (success / 401 cases)myapp 1.0 → 1.1 + Redis
850–60Readiness review and Troubleshooting basics10-item readiness checklist, common create/access/pull/scheduling failuresReadiness scorecard + interactive troubleshooting treeComplete one review with az / kubectl
—After classCheat sheet · Capstone labFrom zero to myapp in production, review, stop/cleanupFinal quiz (12 questions)Capstone lab

Knowledge Coverage Matrix

Target skillsM1M2M3M4M5M6M7M8Key commandsLab
Explain AKS architecture and responsibility boundaries✓·✓··✓·✓az aks show --query nodeResourceGroupM1 identify resources
Choose pricing tier and support plan·✓✓····✓--tier, --k8s-support-planM2 switch tier
Plan the Kubernetes version lifecycle·✓✓··✓·✓az aks get-versions, get-upgradesM2 version table
Create Standard / Automatic clusters··✓✓✓·✓·az aks create [--sku automatic]M3 create cluster
Design system / user node pools··✓✓··✓✓az aks nodepool add --modeM4 add pools
Entra authentication and Azure RBAC··✓·✓··✓kubelogin convert-kubeconfigM5 disable local accounts
Manage add-ons and extensions··✓··✓·✓az aks enable-addons, az k8s-extensionM6 metrics
Publish apps from ACR···✓··✓✓--attach-acr, az aks check-acrM7 myapp
Readiness review and Troubleshooting basics✓✓✓✓✓✓✓✓kubectl get events, az aks showM8 review

What this hour does not cover (and where to learn it)

TopicWhy it's not in this hourWhere to learn it
General Kubernetes objects (Pods, Deployments, Services, probes, HPA)PrerequisitesKubernetes 8 + 1 hour crash course
CNI selection (Overlay / VNet / Cilium), outbound types, private clusters, API server VNet integration, ingress (application routing Gateway API, AGC), network policy, DNSThis hour only uses the default Overlay + load balancer outboundHour 2 · Networking
Deeper Azure RBAC and K8s RBAC, Workload Identity, Key Vault CSI, image integrity, Azure Policy, DefenderThis hour only covers getting “people” into the clusterHour 3 · Identity and security
Cluster Autoscaler, NAP, KEDA, VPA, Spot, GPU, PDB and availability zone designThis hour's node count is fixedHour 4 · Scaling and node management
Bicep / Terraform AVM, Flux / Argo CD, pipeline deployment, Fleet Manager, backupThis hour does everything by hand with the az CLIHour 5; for tool details see the Helm, GitHub, and Azure DevOps hours
Upgrade channels, maintenance windows, Container Insights, Managed Prometheus, cost analysisBelongs to day-to-day operationsHour 6; for Managed Prometheus details see the Prometheus & Grafana hour
Deep Troubleshooting for node NotReady, IP / SNAT exhaustion, upgrade failuresThis hour only covers the basicsHour 7; the 50 production problems and interview questions are in Hour 8

How to use this course material

10 pages per module
Principles · diagrams · animation · commands · lab · production case · Troubleshooting · quiz · voice · video. Read “Principles” and “animation” first, then do the “lab”. The Module 3 animation is the core of this hour: walk through both the Standard and Automatic paths.
Learning progress
A module counts toward progress when you score ≥ 70% on the quiz or click “Mark this module complete.” Progress is saved in this browser's localStorage (it is cleared on refresh in private mode or when storage is disabled).
English voice
The “Voice” tab reads the narration aloud with the browser's built-in Web Speech API (en-US), and English terms are pronounced with en-US. If no English voice pack is installed, the narration text can still be read or passed to a TTS tool.
Version and cost notes This hour uses the state as of 2026-11-15 as its baseline. The latest AKS GA is Kubernetes 1.37 (GA in 2026-10, patch 1.37.1, marked as an LTS version), the default for new clusters is 1.36 (patch 1.36.5), and 1.35 (1.35.9) is still in community support. Community support for 1.34 ends at the end of 2026-11. The latest Azure CLI is 2.93.0 (released 2026-11-15), and AKS Automatic requires 2.86.0 or later. The lab cluster is estimated as “Free tier + 2 D4s_v5 system nodes + 2 D2s_v5 user nodes,” about US$0.7–0.9 per hour (pay-as-you-go example estimate; check the pricing calculator for your region). When you finish, run the cleanup command in the last step of the Capstone lab.

Module 0 · Environment setup (Azure subscription, Azure CLI, kubectl)

Prepare the subscription and roles, install the tools, register resource providers, and set the variables shared across the course
Before class ≈ 15 minutesAzure CLI ≥ 2.86 (2.93 recommended)Incurs Azure costs
Prerequisites
  • Azure subscription: pay-as-you-go or enterprise subscription. Free trial subscriptions usually have a vCPU quota of only 4, which is not enough for this hour's 4 nodes. Some trial and student subscriptions also block ACR Tasks (az acr build); Module 7 provides an alternative step using local docker push.
  • Required Azure roles: on the subscription or on the resource group rg-aks-lab, at least Contributor (to create the cluster), plus User Access Administrator or Role Based Access Control Administrator (both --attach-acr and Azure RBAC authorization need to create role assignments). The simplest option is Owner on the resource group.
  • Lab machine: bash on Linux / macOS / WSL2, or Azure Cloud Shell directly (az, kubectl, kubelogin, and helm are preinstalled). All commands in this hour use bash syntax.
  • Connection to the previous course: reuse myapp from the Docker course (Flask + gunicorn + Redis, port 5000, /healthz, tags 1.0 / 1.1). If you already created a cluster named aks-lab in Hour 6 of the K8s course, delete its resource group first or use a new resource group name to avoid mismatched parameters.

Step 1: Install or upgrade the Azure CLI

az version --query '\"azure-cli\"' -o tsv        # Needs ≥ 2.86.0 (required by AKS Automatic); the latest as of 2026-11-15 is 2.93.0
az upgrade --yes                                # If you installed with a package manager, upgrade with that package manager
az login                                        # Browser login; in environments without a browser, use az login --use-device-code
az account show --query "{name:name, id:id, tenant:tenantId, user:user.name}" -o table
# If you have multiple subscriptions:
# az account set --subscription "<subscription name or ID>"
2.93.0
Name             Id                                    Tenant                                User
---------------  ------------------------------------  ------------------------------------  ------------------
Contoso-Lab      00000000-1111-2222-3333-444444444444  aaaabbbb-0000-cccc-1111-dddd2222eeee  you@contoso.com

Step 2: Install kubectl and kubelogin

When you access a cluster with Entra integration enabled, kubectl uses an exec credential plugin to call kubelogin and get a token (explained in detail in Module 5). az aks install-cli installs both; Cloud Shell has them preinstalled.

sudo az aks install-cli                 # Installs to /usr/local/bin by default; without sudo, add --install-location ~/bin/kubectl --kubelogin-install-location ~/bin/kubelogin
kubectl version --client
kubelogin --version
Client Version: v1.37.1
Kustomize Version: v5.x.x
kubelogin version
git hash: v0.2.22/…
Go version: go1.2x.x

Version skew: kubectl and the API server may differ by at most one minor version (for a 1.36 cluster, use kubectl 1.35–1.37). The latest kubelogin is v0.2.22 (2026-10-24).

Step 3: Register resource providers

The first time a new subscription uses a service, the matching resource provider (RP) must be registered. AKS Automatic enables Azure Policy, and the docs require registering Microsoft.PolicyInsights in advance; cluster extensions (Module 6) need Microsoft.KubernetesConfiguration.

for ns in Microsoft.ContainerService Microsoft.ContainerRegistry Microsoft.Compute Microsoft.Network \
          Microsoft.OperationsManagement Microsoft.OperationalInsights Microsoft.Monitor \
          Microsoft.PolicyInsights Microsoft.KubernetesConfiguration; do
  az provider register --namespace $ns --wait
  echo "$ns: $(az provider show -n $ns --query registrationState -o tsv)"
done
Microsoft.ContainerService: Registered
Microsoft.ContainerRegistry: Registered
…
Microsoft.KubernetesConfiguration: Registered

Step 4: Set the variables shared across the course

All 8 hours use the following naming. The variables are written to ~/.aks-lab.env; at the start of each hour, just source it once (ACR names must be globally unique, so the random suffix is generated only once).

cat > ~/.aks-lab.env <<EOF
RG=rg-aks-lab
LOC=canadacentral
CLUSTER=aks-lab
ACR=acraks$RANDOM
EOF
source ~/.aks-lab.env
echo "$RG $LOC $CLUSTER $ACR"
az group create -n $RG -l $LOC --tags course=aks-8h owner=$(az account show --query user.name -o tsv) -o table
rg-aks-lab canadacentral aks-lab acraks18342
Location       Name
-------------  ----------
canadacentral  rg-aks-lab

Step 5: Check regional quota and available versions

az vm list-usage -l $LOC --query "[?contains(name.value,'standardDSv5Family') || name.value=='cores'].{name:name.localizedValue, used:currentValue, limit:limit}" -o table
az aks get-versions -l $LOC -o table
Name                              Used    Limit
--------------------------------  ------  -------
Total Regional vCPUs              0       100
Standard DSv5 Family vCPUs        0       100
KubernetesVersion    Upgrades                    SupportPlan
-------------------  --------------------------  --------------------------------------
1.37.1               None available              KubernetesOfficial, AKSLongTermSupport
1.36.5               1.37.1                      KubernetesOfficial, AKSLongTermSupport
1.35.9               1.36.5                      KubernetesOfficial, AKSLongTermSupport
1.34.12              1.35.9                      KubernetesOfficial, AKSLongTermSupport

This hour needs about 12 DSv5 vCPUs (2 × D4s_v5 + 2 × D2s_v5). If your quota is insufficient, request more on the portal's “Quotas” page, or first change --node-vm-size to a series you have quota for.

Cost and security notes ① Cluster nodes are billed as regular VMs. To stop billing, run az aks stop -g $RG -n $CLUSTER (both control plane and nodes are stopped; disks and public IPs are still billed), or delete the resource group with az group delete -n $RG --yes --no-wait. ② myapp in this hour is exposed through a public LoadBalancer for lab use only; do not put any real data or secrets in the lab cluster. ③ Deleting the resource group also deletes the node resource group MC_rg-aks-lab_aks-lab_canadacentral that AKS created automatically.

Warm-up: answer from memory (30 seconds)

In a kind cluster you can docker exec into the control plane node and look at etcd. Can you do that in AKS?

No. The AKS control plane runs in a subscription managed by Microsoft. You cannot see or log in to its VMs; you can only reach the API server through its public (or private) endpoint. kubectl get nodes lists only your worker nodes.

Does the AKS control plane cost money?

It depends on the pricing tier. The Free tier has no cluster management fee. Standard and Premium charge a management fee per cluster-hour and provide an SLA with financial backing. Node VMs, disks, load balancers, and public IPs are billed separately as Azure resources on every tier (Module 2).

Environment self-check list

Module 1 · AKS architecture: managed control plane and responsibility boundaries

00:00 – 06:00 · An AKS cluster = the control plane you can't see + two resource groups in your subscription + a set of managed identities
6 minutesControl plane managed by AzureShared responsibility model★★★★★
Learning goals
  • Name the 5 components of the AKS control plane, where they run, and the one entry point you use to interact with it (the API server endpoint).
  • Explain why AKS creates two resource groups: the one holding the cluster resource (Microsoft.ContainerService/managedClusters) and the node resource group MC_<rg>_<cluster>_<region>, and list the typical resources in the node resource group.
  • Tell apart the cluster identity (what the control plane uses to manage Azure resources) and the kubelet identity (what nodes use to pull images), and assign 12 operational tasks to Microsoft, to you, or to both under the shared responsibility model.
Prerequisites: the control plane and node components from the K8s course. Importance: ★★★★★ (the mental model for every later module)

What: what AKS is

Azure Kubernetes Service (AKS) is Azure's managed Kubernetes service. It runs the same upstream Kubernetes as the cluster you build with kind or kubeadm (CNCF-conformant). The difference: Azure runs and maintains the control plane, the nodes are Azure VMs in your subscription, and networking, load balancing, disks, and identity are created by the AKS resource provider (RP), which calls Azure APIs for you. AKS offers two cluster modes: AKS Standard (every setting is configurable) and AKS Automatic (production defaults pre-configured, managed nodes; Module 3). In both modes, Azure manages the control plane.

LayerComponentWhere it runsWho operates itWhat you can do
Control planekube-apiserver, etcd, kube-scheduler, kube-controller-manager, cloud-controller-managerMicrosoft-managed subscription (you can't see the VMs)Microsoft: availability, patching, etcd backup and scalingReach it through the API server endpoint; choose the version, pricing tier, and public/private endpoint; turn on control plane logs (diagnostic settings)
Nodeskubelet, kube-proxy (or replaced by Cilium when the Cilium data plane is used), container runtime containerdYour subscription: VMSS in the node resource group (or Virtual Machines node pools)Shared: AKS publishes node images and patches, you decide when to apply them (or turn on an auto-upgrade channel)Choose VM size, OS, node count, and availability zones; upgrade node images; do not modify VMs directly
System componentCoreDNS, konnectivity-agent, metrics-server, CNI / CNS, CSI drivers, cloud-node-managerOn your nodes (kube-system); when AKS Automatic hosts the system node pool, in the AKS subscriptionMicrosoft deploys and upgrades them (labeled kubernetes.azure.com/managedby: aks)Read-only observation; adjust through the AKS-supported methods (ConfigMap customization)
WorkloadsYour Deployments, Services, Ingresses, Secrets…Your nodesYouAll

Why: why manage the control plane

  • Hand over the hardest-to-run parts: etcd backup and quorum, API server high availability and certificates, and version compatibility of control plane components. In a self-managed cluster, a mistake here takes the whole cluster down. In regions that support availability zones, AKS spreads the control plane across multiple zones by default, regardless of whether your node pools span zones.
  • Native Azure integration: a Service with type: LoadBalancer automatically becomes an Azure load balancer rule, PVCs automatically create Azure Disks / Files, nodes pull ACR images with a managed identity, and people sign in with Microsoft Entra ID.
  • A predictable lifecycle: versions, patches, and node images ship on a published calendar (Module 2), not on a “we'll upgrade when we have time” basis.

How: what a cluster is made of in Azure

  1. Cluster resource: Microsoft.ContainerService/managedClusters/aks-lab, located in the resource group you specified, rg-aks-lab. Every az aks command acts on it. It is a “desired state” (version, node pools, networking, add-ons, …).
  2. Control plane: the AKS RP runs it for you in Microsoft's subscription and exposes an FQDN such as aks-lab-rg-aks-lab-xxxxxx-abcd1234.hcp.canadacentral.azmk8s.io. The server: field in kubeconfig points to it.
  3. Node resource group: a second resource group the AKS RP creates automatically, default name MC_rg-aks-lab_aks-lab_canadacentral (you can set a custom name with --node-resource-group, but only at creation time). It contains the VMSS, a managed VNet (when you don't bring your own), NSGs, a Standard load balancer named kubernetes, outbound public IPs, the kubelet managed identity, add-on managed identities, disks created by PVCs, and so on. Its lifecycle follows the cluster: delete the cluster and it is deleted too.
  4. Managed identities:
    • Cluster identity (system-assigned by default): the control plane uses it to call Azure APIs, for example to add rules for LoadBalancer Services or create disks for PVCs.
    • Kubelet identity (user-assigned, named aks-lab-agentpool, located in MC_*): the kubelet on nodes uses it to pull images from ACR. --attach-acr grants it AcrPull (Module 7).
    • Add-on identities: for example, the separate identities for monitoring, Azure Policy, and Key Vault CSI, also located in MC_*.
  5. Communication between nodes and the control plane: nodes connect outward to the API server (kubelet registration, heartbeats). Reverse traffic from the API server to nodes (kubectl logs/exec/port-forward) goes through a tunnel established by konnectivity-agent, so nodes need no inbound ports opened to the control plane.
Do not modify the MC_* resource group by hand Resources in the node resource group are reconciled by AKS. Manually deleting NSG rules, editing VMSS, or adding load balancer rules may be overwritten during the next upgrade or scaling operation, or leave the cluster in an unsupported state. AKS Standard can turn on “node resource group lockdown” (--nrg-lockdown-restriction-level ReadOnly) to prevent accidental changes; AKS Automatic is preconfigured as fully managed and cannot be modified. Set tags on the cluster resource; AKS propagates them.

When: the shared responsibility model, who owns what

ItemMicrosoftYou
Control plane availability, patching, etcd✓ Fully responsible; the Standard/Premium tiers provide the SLAChoose the pricing tier; the Free tier has no financially backed SLA
Kubernetes minor version upgradesPublish new versions; after a version expires, platform-initiated upgrades run (from 2027-06-01)Plan and run upgrades, or turn on the auto-upgrade channel + maintenance window
Node OS security patchesA new node image is released weekly; SecurityPatch / NodeImage channels are providedChoose the node OS upgrade channel and set maintenance windows; with Unmanaged, handle reboots yourself
Node size, count, availability zones, quotaCapability provided✓ Design and request quota
System components (CoreDNS, CNI, CSI)✓ Deployed, patched, upgraded with the versionReserve enough resources for system components (system node pool)
Network design (CNI, address space, outbound, ingress)Options provided✓ Planning (Hour 2)
Identity and access (Entra, RBAC, workload identity)Integrations provided✓ Configuration and authorization (Hour 3)
Workloads, images, secrets, backup—✓ All of it
Common misconceptions ① “Managed = Microsoft will upgrade everything for me.” A Standard cluster defaults to manual upgrades, and node images are not applied automatically by default either; only when you turn on a channel (or use the preconfigured channel on Automatic) does it happen automatically. ② “If the control plane breaks, I'll see a control-plane node in NotReady.” There are no control plane nodes in the output of kubectl get nodes on AKS. ③ “I can put my own resources in the MC_ resource group.” It is deleted with the cluster, so anything you put there disappears with it. ④ “The Free tier has fewer features than Standard.” The features are the same; the differences are the SLA, recommended node scale, and (for Premium) LTS.

Architecture diagram: the full picture of an AKS Standard cluster

Microsoft-managed subscription AKS control plane (you can't see the VMs) kube-apiserver (FQDN *.azmk8s.io) etcd scheduler controller-manager cloud-controller-mgr Regions that support availability zones: spread across zones by default Standard/Premium: 99.95% (AZ) / 99.9% SLA Free: best effort, no financial backing Resource group rg-aks-lab managedClusters/aks-lab (desired state) registries/acraksNNNNN (Module 7) Your own Key Vault, VNet (optional)… Node resource group MC_rg-aks-lab_aks-lab_canadacentral (created and reconciled automatically by AKS) VMSS aks-system-…-vmss Nodes = Azure VMs (AKS node image) kubelet · containerd · kube-proxy konnectivity-agent · CoreDNS · CNI Availability zones 1 / 2 / 3 aks-vnet-… / NSG (managed VNet) Load balancer kubernetes + outbound public IP Managed identity aks-lab-agentpool (kubelet) Azure Disks created by PVCs, public IPs for LoadBalancer Services, add-on identities… Delete the cluster → the entire MC_ resource group is deleted with it ARM Cluster identity calls Azure APIs: LB rules, disks kubelet connects outward to register
Figure 1-1: the control plane is in Microsoft's subscription, while nodes and networking are in the MC_ resource group in your subscription; the two communicate through the API server endpoint and the konnectivity tunnel

Comparison diagram: responsibility layers for self-managed clusters vs AKS Standard vs AKS Automatic

Self-managed (kubeadm) AKS Standard AKS Automatic Workloads Node pool design / scaling Node OS patching / upgrades System component Control plane + etcd Workloads Node pool design / scaling Node patching (you choose the channel) System component Control plane + etcd Workloads (subject to deployment safeguards) NAP provisions nodes on demand Automatic upgrades (stable + NodeImage) Managed system node pool Control plane + etcd
Figure 1-2: red = you are responsible; yellow = shared (Microsoft provides, you decide the timing); green = Microsoft is responsible. Automatic does not take away the “workloads” layer
You are responsibleShared responsibilityMicrosoft is responsible

Interactive: responsibility sorting

Each card is a real operational task. Pick a card, then decide who is responsible for it in AKS Standard. After you answer, the basis is shown; once all are answered, the score is displayed.

Pick a card first.

Core commands and parameters

CommandPurposeKey parameters / notes
az aks showRead the desired and current state of a cluster resourceCommon --query fields: fqdn, nodeResourceGroup, identity, identityProfile.kubeletidentity, powerState, provisioningState, currentKubernetesVersion
az resource list -g MC_…List the Azure resources in the node resource group-o table; or az aks show --query nodeResourceGroup -o tsv to get the name first
az aks listList the clusters in the subscription-o table
az aks waitWait for an asynchronous operation to complete--created, --updated, --interval, --timeout (used with --no-wait)
az aks operation show-latestCheck the status of the most recent long-running operationTroubleshoot a cluster stuck in Updating (some versions need the aks-preview extension)
kubectl get nodes -o wideOnly see worker nodesLabels kubernetes.azure.com/agentpool, topology.kubernetes.io/zone
kubectl get pods -n kube-system -l kubernetes.azure.com/managedby=aksAKS-managed system componentsManaged components all carry this label
source ~/.aks-lab.env
az aks show -g $RG -n $CLUSTER --query "{fqdn:fqdn, nodeRG:nodeResourceGroup, k8s:currentKubernetesVersion, tier:sku.tier, mode:sku.name, power:powerState.code, identity:identity.type, kubelet:identityProfile.kubeletidentity.resourceId}" -o yaml
fqdn: aks-lab-rg-aks-lab-0f1e2d-6b1d3c2a.hcp.canadacentral.azmk8s.io
identity: SystemAssigned
k8s: 1.36.5
kubelet: /subscriptions/…/resourcegroups/MC_rg-aks-lab_aks-lab_canadacentral/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aks-lab-agentpool
mode: Base
nodeRG: MC_rg-aks-lab_aks-lab_canadacentral
power: Running
tier: Free

How to verify: mode: Base means an AKS Standard cluster (the SKU name in the API is Base; Automatic clusters show Automatic). Common mistake: confusing sku.tier (Free/Standard/Premium, the pricing tier) with sku.name (Base/Automatic, the cluster mode). “Standard tier” and “AKS Standard mode” are two different things.

NODE_RG=$(az aks show -g $RG -n $CLUSTER --query nodeResourceGroup -o tsv)
az resource list -g $NODE_RG --query "[].{type:type, name:name}" -o table
Type                                                Name
--------------------------------------------------  ------------------------------------
Microsoft.Network/networkSecurityGroups             aks-agentpool-12345678-nsg
Microsoft.Network/virtualNetworks                   aks-vnet-12345678
Microsoft.ManagedIdentity/userAssignedIdentities    aks-lab-agentpool
Microsoft.Compute/virtualMachineScaleSets           aks-system-12345678-vmss
Microsoft.Network/publicIPAddresses                 6c1f…-…-outbound-ip
Microsoft.Network/loadBalancers                     kubernetes

Lab 1: Get to know the cluster while you build it (about 10 minutes, including 6–10 minutes of waiting)

Creating the cluster takes several minutes, so this module starts creation with --no-wait and uses the wait to watch ARM and the two resource groups. Each parameter is explained one by one in Module 3. Cost: billing starts at this step (about US$0.5 per hour).

Start creation (Standard mode, Free tier, Entra + Azure RBAC)
source ~/.aks-lab.env
az aks create -g $RG -n $CLUSTER -l $LOC \
  --tier free \
  --kubernetes-version 1.36 \
  --nodepool-name system --node-count 2 --node-vm-size Standard_D4s_v5 --zones 1 2 3 \
  --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.0.0.10 \
  --enable-aad --enable-azure-rbac \
  --enable-oidc-issuer --enable-workload-identity \
  --auto-upgrade-channel patch --node-os-upgrade-channel NodeImage \
  --generate-ssh-keys \
  --no-wait
az aks show -g $RG -n $CLUSTER --query provisioningState -o tsv
Creating
See what ARM received: the activity log records a write operation you made on the managedClusters resource.
az monitor activity-log list -g $RG --offset 30m \
  --query "[?contains(operationName.value,'managedClusters')].{op:operationName.value, status:status.value, caller:caller}" -o table
Op                                                 Status    Caller
-------------------------------------------------  --------  ----------------
Microsoft.ContainerService/managedClusters/write   Started   you@contoso.com
Microsoft.ContainerService/managedClusters/write   Accepted  you@contoso.com
Watch the node resource group get created and gradually fill up (run every minute or two):
az group list --query "[?starts_with(name,'MC_rg-aks-lab')].{name:name, managedBy:managedBy}" -o table
az resource list -g MC_${RG}_${CLUSTER}_${LOC} --query "[].type" -o tsv | sort | uniq -c
Name                                  ManagedBy
------------------------------------  ---------------------------------------------------------------
MC_rg-aks-lab_aks-lab_canadacentral   /subscriptions/…/resourcegroups/rg-aks-lab/providers/Microsoft.ContainerService/managedClusters/aks-lab
      1 Microsoft.Compute/virtualMachineScaleSets
      1 Microsoft.ManagedIdentity/userAssignedIdentities
      1 Microsoft.Network/loadBalancers
      1 Microsoft.Network/networkSecurityGroups
      1 Microsoft.Network/publicIPAddresses
      1 Microsoft.Network/virtualNetworks

managedBy points to the cluster resource: this is the marker that “AKS manages this resource group.”

Wait for completion and grant yourself data plane permissions on the cluster: when Azure RBAC is enabled, the creator does not automatically get Kubernetes permissions (except for AKS Automatic created with the CLI), so you must explicitly assign a built-in role (explained in detail in Module 5).
az aks wait -g $RG -n $CLUSTER --created --interval 30 --timeout 1800
AKS_ID=$(az aks show -g $RG -n $CLUSTER --query id -o tsv)
ME=$(az ad signed-in-user show --query id -o tsv)
az role assignment create --role "Azure Kubernetes Service RBAC Cluster Admin" \
  --assignee-object-id $ME --assignee-principal-type User --scope $AKS_ID -o none
az aks get-credentials -g $RG -n $CLUSTER --overwrite-existing
kubectl get nodes -L topology.kubernetes.io/zone,kubernetes.azure.com/mode
NAME                             STATUS   ROLES    AGE   VERSION   ZONE              MODE
aks-system-12345678-vmss000000   Ready    <none>   3m    v1.36.5   canadacentral-1   system
aks-system-12345678-vmss000001   Ready    <none>   3m    v1.36.5   canadacentral-2   system

Role assignments can take 1–5 minutes to take effect; until then you will see Forbidden. Wait and retry. Note that the list shows no control plane nodes.

Identify the three kinds of components:
kubectl get pods -n kube-system -l kubernetes.azure.com/managedby=aks -o custom-columns=NAME:.metadata.name,NODE:.spec.nodeName | head -20
kubectl get --raw /version | jq -r .gitVersion
kubectl cluster-info
NAME                                  NODE
azure-cns-7xk2p                       aks-system-12345678-vmss000000
cloud-node-manager-9sd8f              aks-system-12345678-vmss000000
coredns-6f7b9d8c5d-2mhxz              aks-system-12345678-vmss000001
konnectivity-agent-5f7c8b9d6-q7w2r    aks-system-12345678-vmss000000
metrics-server-7d9f8c6b5-hk4lp        aks-system-12345678-vmss000001
…
v1.36.5
Kubernetes control plane is running at https://aks-lab-rg-aks-lab-0f1e2d-6b1d3c2a.hcp.canadacentral.azmk8s.io:443

There are no kube-apiserver-* or etcd-* Pods: they are not on your cluster nodes.

Cleanup: the cluster created in this lab is reused in all later modules, so don't delete it yet. If you stop for today, run az aks stop -g $RG -n $CLUSTER, then az aks start next time.

Case 1: someone “cleaned up” the NSG rules in the MC_ resource group

Problem: The security team ran a standard baseline script that deleted every NSG rule allowing inbound Internet traffic on 80/443, including the rules AKS had automatically added for a LoadBalancer Service. The production entry point went down. Fix: recover by having AKS reconcile again (delete and recreate the Service, or wait for the controller to sync). The long-term fix is to exclude the MC_* resource group from the baseline script and set Azure Policy on the cluster resource instead; on new clusters, turn on node resource group lockdown (ReadOnly). Limitation: after lockdown, the few legitimate operations you need in MC_* (such as a custom NSG) must use AKS-supported methods instead (such as bringing your own subnet with an NSG, Hour 2).

Case 2: an audit asks “where are the control plane logs?”

Problem: A compliance audit requires keeping API server audit logs for 90 days, and the team believed AKS could not provide them (since they can't see the control plane). Fix: configure a diagnostic setting on the cluster resource to send categories such as kube-audit-admin to Log Analytics or a storage account (Hour 6). Limitation: log volume is large, and kube-audit (which includes read requests) costs much more than kube-audit-admin, so choose based on need.

Case 3: three clusters in one resource group

Problem: dev, test, and prod clusters shared one resource group, so permissions could not be separated by environment, and deleting dev nearly deleted prod by mistake. Fix: restructure to “one resource group per environment (or even one subscription per environment)”, and explicitly name the node resource group with --node-resource-group (for example rg-aks-prod-nodes) so it is easy to identify. Limitation: the node resource group name can only be set at creation time, so existing clusters need to be rebuilt or migrated.

Common errors and fixes

(MissingSubscriptionRegistration) The subscription is not registered to use namespace 'Microsoft.ContainerService'

Cause: the subscription has never used this service, so the resource provider is not registered.

az provider register -n Microsoft.ContainerService --wait
az provider show -n Microsoft.ContainerService --query registrationState -o tsv

Fix: register it and retry. In enterprise environments where you lack registration permission (it requires subscription-level */register/action), ask the subscription owner to register it for you.

(AuthorizationFailed) The client '…' does not have authorization to perform action 'Microsoft.ContainerService/managedClusters/write'

Cause: you do not have Contributor or an equivalent permission on the resource group. ARM rejects the request before it reaches the AKS RP.

az role assignment list --assignee $(az ad signed-in-user show --query id -o tsv) --all -o table

Fix: ask your administrator to grant Contributor on rg-aks-lab (or use the Azure Kubernetes Service Contributor Role plus a custom role with network-related permissions).

(ResourceGroupBeingDeleted) / when trying to delete an MC_ resource group you get "…is managed by … managedClusters"

Cause: MC_* is a managed resource group and cannot be deleted on its own; AKS cleans it up when the cluster is deleted.

Fix: delete the cluster (az aks delete) or the entire resource group with az group delete -n $RG.

kubectl shows no control plane nodes / kubectl get cs reports deprecated

Cause: This is not an error. The control plane does not appear as a node; the componentstatuses API has long been deprecated upstream.

kubectl get --raw='/readyz?verbose' | tail -5
az aks show -g $RG -n $CLUSTER --query "{state:provisioningState, power:powerState.code}"
Command-line exercises
1. Use one command to get the cluster's node resource group name and the clientId of the kubelet identity.
az aks show -g $RG -n $CLUSTER --query "{nodeRG:nodeResourceGroup, kubeletClientId:identityProfile.kubeletidentity.clientId}" -o table
2. List all AKS-managed Pods in kube-system and the node each one runs on.
kubectl get pods -n kube-system -l kubernetes.azure.com/managedby=aks -o wide
Scenario analysis
Your team plans to migrate a self-managed kubeadm cluster to AKS. The operations lead says “After we migrate, we won't have to manage upgrades or patching anymore.” Identify which parts of this statement are correct and which are not, and list the operational responsibilities you should keep after the migration.

Correct: high availability, patching, and backup of the control plane (API server, etcd, scheduler, controllers) are handled by Microsoft; AKS upgrades the system components with the version. Not correct: on Standard clusters, Kubernetes minor version upgrades are manual by default, and node images are not applied automatically by default either. You need to choose an upgrade channel and a node OS channel and configure maintenance windows. After the 60-day grace period (from 2027-06-01), AKS forces a platform-initiated upgrade that does not respect your maintenance windows. Responsibilities to keep: the version and node image upgrade plan, node pool sizing and quota, network and identity design, workload and image security, backup, PDB and availability design, and cost management. If you want to reduce operations work further, evaluate AKS Automatic.

Verified teaching videos

▶
Azure Kubernetes Services (AKS) Overview — John Savill's Technical Training
English · whiteboard walkthrough of the managed control plane, the node resource group, and networking. Recorded earlier; for details such as pricing tiers and kubenet defaults, follow this hour
▶
Azure Kubernetes Service (AKS) High Availability — John Savill's Technical Training
English · availability zones and SLA design for the control plane and nodes

Official docs

Video storyboard (about 90 seconds)

This course material cannot generate a video or MP3 directly. A storyboard and narration script are provided so you can hand them to a video tool.

Shot 1 · 0–20s
Visual: on the left, a cloud labeled “Microsoft subscription” containing five boxes (API server, etcd, and so on), blocked by a lock; on the right, “Your subscription.”
Narration: AKS's control plane runs in Microsoft's subscription. You can't see its VMs; you talk to it only through an API endpoint.
Shot 2 · 20–45s
Visual: two resource groups appear in your subscription; the second, MC_rg-aks-lab_aks-lab_canadacentral, is highlighted, and VMSS, load balancer, VNet, and managed identities pop up inside it.
Narration: When you create a cluster, AKS creates a second resource group for you. Nodes, networking, and the load balancer live there, and AKS keeps reconciling them. Please don't modify it by hand.
Shot 3 · 45–70s
Visual: two badges. “Cluster identity” points to the load balancer and disks; “kubelet identity” points to ACR.
Narration: The cluster identity lets the control plane call Azure APIs on your behalf. The kubelet identity lets nodes pull images from the container registry.
Shot 4 · 70–90s
Visual: a three-color responsibility table, with red, yellow, and green lighting up in turn.
Narration: Microsoft is responsible for the control plane, you are responsible for workloads, and upgrades and patching are shared: Microsoft publishes them, and you decide when to apply them.
or score ≥ 70% on the quiz

Module 2 · Pricing tiers, support policy, and LTS

06:00 – 13:00 · You buy the SLA with a pricing tier, and the lifespan of a version follows the calendar. Both need to go into platform planning
7 minutesFree / Standard / PremiumN-2 · N-3 · LTS★★★★★
Learning goals
  • Compare the SLA, node scale, and use cases of the Free, Standard, and Premium pricing tiers, and state the pricing tier and extra Pod readiness SLA that AKS Automatic comes with.
  • Explain the AKS version support window: N-2 community support, N-3 platform support, the 60-day grace period, and platform-initiated upgrades starting 2027-06-01 (which do not respect maintenance windows).
  • Explain the conditions and cost of LTS: the Premium tier + AKSLongTermSupport, about 24 months of total support, only the two most recent patches are supported, and Calico is not supported. Be able to switch the tier and support plan with commands.
Prerequisites: the version skew policy from the K8s course. Importance: ★★★★★ (version expiry is one of the top sources of production incidents)

What: the pricing tier only decides the “cluster management” part

The AKS bill has two parts: the cluster management fee (set by the pricing tier) and the Azure resources you consume (node VMs, disks, load balancers, public IPs, logs, and so on, all billed separately on every tier). The pricing tier and the cluster mode are two separate dimensions: a Base (Standard mode) cluster can use any of the three tiers; an Automatic cluster is created preconfigured on the Standard tier.

FreeStandardPremium
Use caseDevelopment, testing, learning, evaluationProduction, enterprise workloadsProduction needing LTS, regulated industries
API server SLANo financial backing (best effort)99.95% (with availability zones enabled) / 99.9% (not enabled)Same as Standard
Node scaleRecommended under 10 nodes, supports up to 1,000Up to 5,000Up to 5,000
FeaturesAll current AKS featuresAll + higher reliability configurationsAll Standard features + LTS (1 extra year after community support)
CLI--tier free (default for Base clusters)--tier standard--tier premium --k8s-support-plan AKSLongTermSupport (both must be set)
Cluster management fee0Billed per cluster-hour; see the AKS pricing page (historically published prices were about US$0.10 per cluster-hour for Standard and US$0.60 for Premium; the figures could not be read from the pricing page when this was verified, so use the calculator)
AKS Automatic SLAAutomatic clusters are preconfigured on the Standard tier (up to 5,000 nodes) and include two SLAs: API server availability 99.95%, and a Pod readiness SLA that applies only to Automatic: 99.9% of eligible Pod readiness operations complete within 5 minutes (covering scheduling and on-demand node creation).

Why: why the version support window matters

Upstream Kubernetes releases a minor version roughly every 4 months, and each version is maintained for about a year. AKS provides full support only while upstream is still shipping patches for that version; after that window, the cluster stops receiving security fixes. AKS uses three layers of mechanism to turn this into a plannable calendar:

PhaseScopeWhat you getTypical duration
Community support (KubernetesOfficial)Latest GA minor version N and N-1, N-2Patches, component updates, full AKS support; new clustersAbout 12 months from GA
Platform supportN-3 (until it drops to N-4)Only Azure platform issues (scaling, VMs, storage networking, start/stop, certificate rotation, SLA); no longer fixes for Kubernetes components, no security patches, and new clusters cannot be createdUntil one version later reaches GA
Grace periodAfter the version is no longer supportedTime to upgrade yourself60 days
Platform-initiated upgradeClusters still not upgraded when the grace period endsAKS automatically upgrades the cluster to the lowest supported version within the current support tier (one minor version at a time); it does not respect maintenance windows, does not run deprecated-API checks, and can get past PDBs that block evictionStarts 2027-06-01, rate-limited by region

Version calendar as of 2026-11-15 (excerpt, verified)

VersionAKS GACommunity support endsPlatform supportLTS endsCurrent latest patch
1.332025-062026-07Until 1.37 GA (ended)2027-07—
1.342025-112026-11 (end of this month)Until 1.38 GA (planned 2027-02)2027-111.34.12
1.352026-032027-03Until 1.39 GA2028-031.35.9
1.362026-062027-06Until 1.40 GA2028-061.36.5 (default for new clusters)
1.372026-102027-10Until 1.41 GA2028-101.37.1 (latest GA, marked as an LTS version)
1.38Planned 2027-02 (preview 2026-11)TBD

A month means the last day of that month; for example, “2027-03” means 2027-03-31. New versions roll out region by region under safe deployment practices, and it may take up to 10 business days to cover all regions. For real-time status, see the AKS release tracker.

How: how LTS works

  • Duration: 1 year of community support + 1 year of LTS ≈ 24 months from GA. During LTS, AKS backports upstream security fixes.
  • Eligibility: every supported Kubernetes version can enable LTS, but it must be turned on explicitly. AKS never moves a cluster into LTS automatically, and never changes your billing tier.
  • Enable: --tier premium --k8s-support-plan AKSLongTermSupport, and it is recommended to also set --auto-upgrade-channel patch, because LTS only supports the two most recent patches of each minor version. Enabling it is a pure configuration change and does not rebuild nodes.
  • Disable: --tier free|standard --k8s-support-plan KubernetesOfficial; if the version is already past its community support period, you must first upgrade to a community-supported version before disabling.
  • End of life: after LTS ends, there is a 60-day grace period; after that, a platform-initiated upgrade moves the cluster to the next supported LTS version (staying on the LTS track).
  • Incompatible items: Calico network policy, which Microsoft manages, is not supported with LTS (enabling returns LTSUnsupportedAddon). Add-ons have their own lifecycles (for example, the Open Service Mesh add-on is supported until 2027-09-30), so check each one before enabling.

When: how to choose

ScenarioRecommendation
Personal learning, PR preview environments, test clusters that can be rebuilt at any timeFree tier + community support; run az aks stop or delete when finished
Production, where the team can follow one minor upgrade per quarterStandard tier + availability zones + auto-upgrade channel (stable or patch) + maintenance window
Production with complex dependencies, annual change windows, compliance freeze periodsPremium + LTS, and plan a “jump” upgrade to the next LTS before the current LTS ends
Want Azure to own the platform defaultsAKS Automatic (Standard tier preconfigured + Pod readiness SLA)
Common misconceptions ① “LTS means I never have to upgrade”: LTS only adds one year, and at the end you are still subject to platform-initiated upgrades. ② “The Free tier can't be used for any production”: technically it supports all features, but it has no financially backed SLA, and we don't recommend more than 10 nodes. ③ “Version expiry just means you can't open a support ticket”: past platform support there are no security patches, and since 2027-06 you will be forced to upgrade, regardless of your maintenance window. ④ “When the control plane upgrades, nodes catch up automatically”: node pools must be upgraded separately (or together via the auto-upgrade channel); the control plane can lead node pools by at most 3 minor versions.

Lifecycle diagram: the life of a minor version (using 1.36 as an example)

2026-05 preview2026-06 GA2027-06 community support ends2028-06 LTS ends Preview Community support (N → N-1 → N-2) · about 12 months Platform support (N-3)Until 1.40 GA 60-day grace→ platform upgrade KubernetesOfficial (Free / Standard / Premium all available) Community support LTS: backported security fixes (latest 2 patches only) 60-day grace→ next LTS AKSLongTermSupport (Premium only)
Figure 2-1: the same version, with different support plans, has a lifespan that differs by one year; both lines end in “being upgraded”

Decision diagram: choosing a pricing tier

Production environment?Need the API server SLA? Free Can you upgradeat least once a minor version within a year? Standard Premium + LTS--k8s-support-plan AKSLongTermSupport or AKS AutomaticPreconfigured Standard tier No Yes Yes No
Figure 2-2: choosing a pricing tier is essentially two questions: do you need an SLA, and can you keep up with the version cadence

Interactive: version lifecycle calculator

Choose a Kubernetes version and a support plan, drag the date, and see which support status this cluster is in during that month and what you need to do. Data comes from the AKS version calendar as of 2026-11-15; dates marked “TBD” are treated as not yet announced.

Date:

Core commands and parameters

CommandPurposeKey parameters / notes
az aks get-versions -l REGIONVersions available in the region, upgrade targets, support plans-o table; preview versions show only when the aks-preview extension is installed
az aks get-upgrades -g RG -n NAMEVersions this cluster can upgrade toControl plane and node pools are listed separately
az aks create/update --tierSet the pricing tierfree / standard / premium
--k8s-support-planSupport planKubernetesOfficial / AKSLongTermSupport (set together with premium)
--kubernetes-version 1.36Specify a versionSpecifying only the minor version (an alias, CLI ≥ 2.37) uses that minor version's latest GA patch; if omitted, the region default version is used
az aks nodepool list --query "[].currentOrchestratorVersion"Check node pool versionsThe control plane can lead node pools by at most 3 minor versions
source ~/.aks-lab.env
az aks show -g $RG -n $CLUSTER --query "{tier:sku.tier, supportPlan:supportPlan, version:currentKubernetesVersion, autoUpgrade:autoUpgradeProfile}" -o yaml
az aks get-upgrades -g $RG -n $CLUSTER -o table
autoUpgrade:
  nodeOsUpgradeChannel: NodeImage
  upgradeChannel: patch
supportPlan: KubernetesOfficial
tier: Free
version: 1.36.5
Name     ResourceGroup    MasterVersion    Upgrades
-------  ---------------  ---------------  ----------
default  rg-aks-lab       1.36.5           1.37.1

Switch the pricing tier (a configuration change with no downtime)

az aks update -g $RG -n $CLUSTER --tier standard -o none   # Starts charging the cluster management fee
az aks show -g $RG -n $CLUSTER --query sku -o json
az aks update -g $RG -n $CLUSTER --tier free -o none       # Switch back when the lab is done
# Premium + LTS (demo only; do not run in the lab, it incurs higher costs):
# az aks update -g $RG -n $CLUSTER --tier premium --k8s-support-plan AKSLongTermSupport --auto-upgrade-channel patch
{
  "name": "Base",
  "tier": "Standard"
}

How to verify: name is the cluster mode (Base = Standard mode), and tier is the pricing tier. Common mistake: running only --tier premium without --k8s-support-plan AKSLongTermSupport is rejected. The two must be enabled together or disabled together.

Lab 2: find out how long your cluster can keep running (about 6 minutes)

List regional versions and find the default version
az aks get-versions -l $LOC --query "values[].{v:version, preview:isPreview, plans:capabilities.supportPlan, patches:keys(patchVersions)}" -o table

Version 1.33 is not in the table: it is past platform support and can no longer be created. The supportPlan for both 1.37 and 1.36 includes AKSLongTermSupport, which means every supported version can enable LTS.

Check whether the control plane and node pool versions match
az aks show -g $RG -n $CLUSTER --query currentKubernetesVersion -o tsv
az aks nodepool list -g $RG --cluster-name $CLUSTER --query "[].{pool:name, version:currentOrchestratorVersion, image:nodeImageVersion}" -o table
1.36.5
Pool    Version    Image
------  ---------  ------------------------------------------
system  1.36.5     AKSUbuntu-2404gen2containerd-202611.03.0

The date suffix of nodeImageVersion tells you how new the node image is. AKS publishes a new image every week, and the NodeImage channel applies it automatically within the maintenance window.

Try switching the pricing tier (the three commands on the commands tab), and observe that kubectl get nodes stays available and nodes are not rebuilt during the switch:
az aks update -g $RG -n $CLUSTER --tier standard -o none && kubectl get nodes
az aks update -g $RG -n $CLUSTER --tier free -o none
Double-check with the calculator: on the “animation” tab, select 1.36 + KubernetesOfficial, drag the date to 2027-07, and write down the state your cluster will be in and the action required; then switch to LTS and see the difference on the same date.
Subscribe to version notifications: watch the Releases of the Azure/AKS repository on GitHub, or set alerts through Azure Advisor / Resource Health (when a cluster runs an unsupported version, Resource Health shows Degraded).

Case 1: no upgrade for a year, and on Monday morning the cluster has been upgraded

Problem: A team's cluster was left on a version that had passed platform support. The notification email went to a shared mailbox that nobody checked. After the grace period ended, AKS ran a platform-initiated upgrade, which ignored their weekend maintenance window, and a CronJob that depended on a removed API failed. Fix: route Azure Advisor and Resource Health alerts to the on-call channel; turn on the patch or stable channel on each cluster and set maintenance windows; establish a “one minor version upgrade per quarter” cadence, and run deprecated-API checks before upgrading (Hour 6). Limitation: a platform-initiated upgrade cannot be opted out of; the only way to control it is to upgrade yourself ahead of time.

Case 2: a bank's core system chooses LTS

Problem: regulators require a 6-week change review for every platform change, with at most two change windows a year, and the community support cadence cannot keep up. Fix: production clusters use Premium + LTS + the patch channel, with a cross-version upgrade to the next LTS every 12–18 months; test clusters stay on community support and validate upgrades in advance. Limitation: the cluster originally used Microsoft-managed Calico for network policy, and enabling LTS returns LTSUnsupportedAddon, so it must first migrate to Cilium (Hour 2).

Case 3: all dev clusters moved to the Free tier

Problem: 40 PR preview clusters were all running on the Standard tier, paying the cluster management fee every month for nothing. Fix: use Azure Policy to audit clusters with sku.tier != Free in non-production subscriptions, default to --tier free in templates, and run az aks stop overnight. Limitation: the Free tier has no SLA, so you need to accept occasional API unavailability in preview environments.

Common errors and fixes

(K8sVersionNotSupported) Managed cluster … is on version 1.33.x, which is not supported in this region.

Cause: the requested version is no longer supported (or the new version has not yet rolled out in this region). It is common for old scripts to hardcode version numbers.

az aks get-versions -l $LOC -o table

Fix: use a version listed in the table; in scripts, specify only the minor version (such as 1.36) or omit it so AKS picks the default version.

LTSUnsupportedAddon / Premium tier requires AKSLongTermSupport

Cause: when enabling LTS, the cluster uses components that don't support LTS (such as Microsoft-managed Calico), or premium and the support plan were not set as a pair.

Fix: set --tier premium --k8s-support-plan AKSLongTermSupport as a pair; migrate unsupported components first, or stay on community support.

Operation is not allowed because the cluster's control plane version and node pool version skew is too large

Cause: the control plane has been upgraded several minor versions while a node pool fell behind by more than the allowed skew (since AKS 1.28, up to 3 minor versions).

az aks nodepool list -g $RG --cluster-name $CLUSTER --query "[].{n:name,v:currentOrchestratorVersion}" -o table

Fix: first upgrade the lagging node pool to the control plane version (az aks nodepool upgrade, Hour 6), then continue upgrading the control plane.

Resource Health: Degraded — "This cluster is running an unsupported Kubernetes version"

Cause: the cluster version is no longer on the supported list; the portal also shows when AKS plans to upgrade it.

Fix: run az aks get-upgrades as soon as possible and upgrade within your own window; if you don't, a platform-initiated upgrade happens after the grace period.

Command-line exercises
1. Switch the existing cluster to the Premium tier and enable LTS, while making sure patches are followed automatically.
az aks update -g $RG -n $CLUSTER --tier premium --k8s-support-plan AKSLongTermSupport --auto-upgrade-channel patch
2. Use one command to output the cluster's pricing tier, support plan, and current version.
az aks show -g $RG -n $CLUSTER --query "{tier:sku.tier, plan:supportPlan, v:currentKubernetesVersion}" -o table
Scenario analysis
In 2026-11 you take over 5 production clusters: two on 1.34, two on 1.35, and one on 1.33 (Standard tier). Give a version plan for the next 6 months and your reasoning.

1.33 is past community support, and its platform support ends with the 1.37 GA, so it is unsupported. From 2027-06 it will be subject to platform-initiated upgrades. This is the top priority: upgrade it one minor version at a time as soon as possible (1.33→1.34→1.35→1.36), checking deprecated APIs and node pool skew along the way. Community support for 1.34 ends at the end of 2026-11, and it moves into platform support (until 1.38 GA, planned for 2027-02), so upgrade it to 1.35/1.36 before 2027 Q1. Community support for 1.35 runs until 2027-03, so schedule its upgrade to 1.36 or 1.37 in Q1. If the team really cannot keep up with the cadence, evaluate Premium + LTS for the critical clusters (1.37 is an LTS version, with LTS through 2028-10). At the same time, turn on the patch/stable channel and maintenance windows for all clusters, and connect Advisor/Resource Health alerts to on-call.

Verified teaching videos

▶
Kubernetes and AKS versions — Houssem Dellai
English · AKS version strategy and upgrade paths; recorded in 2023, so for the calendar and the platform-initiated upgrade policy, follow this hour
▶
Upgrading and Maintaining your Azure Kubernetes Service (AKS) Cluster — John Savill's Technical Training
English · versions, upgrades, and maintenance concepts (recorded earlier)

No verified video was found that explains the 2026 LTS and new platform-initiated upgrade policy; see the storyboard script below.

Official docs

Video storyboard (about 90 seconds)

Shot 1 · 0–20s
Visual: three price tags, Free, Standard, and Premium; Standard and Premium each carry a “SLA 99.95%” shield, and Premium has an extra “+1 year” hourglass.
Narration: The pricing tier only covers the cluster management part. Free has no financially backed SLA; Standard does; Premium adds one more year of long-term support on top of Standard.
Shot 2 · 20–50s
Visual: a timeline with four versions, 1.34 to 1.37, moving to the right like trains past three stations: “community support → platform support → 60-day grace.”
Narration: AKS supports the three most recent minor versions. Once a version drops to N-3, only platform support remains, with no security patches. After the 60-day grace period, if you still haven't upgraded, AKS will upgrade for you, and it won't wait for your maintenance window.
Shot 3 · 50–75s
Visual: the same 1.36, with a blue extension line below it labeled AKSLongTermSupport.
Narration: To enable LTS, you need the Premium tier and the long-term support plan. Total support is about two years, but only the two most recent patches are supported, so turn on automatic patch upgrades at the same time.
Shot 4 · 75–90s
Visual: a green checkmark on the calendar for each quarter.
Narration: The best strategy is always this: upgrade every quarter, so the platform-initiated upgrade never gets a chance to hit you.
or score ≥ 70% on the quiz

Module 3 · Creating clusters: AKS Standard and AKS Automatic

13:00 – 21:00 · One az aks create, behind which ARM, the AKS resource provider, the control plane, the node resource group, VMSS, and the kubelet hand off to each other
8 minutes--sku base | automaticCore animation★★★★★
Learning goals
  • Explain each parameter of the az aks create from Module 1, its default value, and which parameters cannot be changed after creation.
  • Create an AKS Automatic cluster with --sku automatic, and list its pre-configured items (managed system node pool, NAP, Azure CNI Overlay + Cilium, managed NAT gateway, Azure RBAC, deployment safeguards, automatic upgrades) and its limits (no Windows nodes, Dapr / Azure ML extensions not supported, CLI ≥ 2.86 required).
  • Recite in order the 8 stages behind az aks create, and be able to tell from an error message which stage failed.
Prerequisites: Modules 1–2. Importance: ★★★★★

What: two cluster modes

In the API, the cluster mode is sku.name: Base (called AKS Standard in the portal and docs) or Automatic. The CLI selects it with --sku base|automatic, and the default is base. Automatic is the experience of “production defaults with Azure-managed nodes”, and the docs recommend it as the default choice for most production workloads. Standard suits teams that need deep customization (bringing their own CNI, Windows nodes, special outbound, fine-grained node pools).

AspectAKS Standard (Base)AKS Automatic
System node poolDefault: you create and manage itPreconfigured: managed system node pool; system nodes and components run in the AKS subscription (--enable-hosted-system)
Workload nodesManual scaling by default; Cluster Autoscaler or NAP optionalPreconfigured: node auto-provisioning (NAP, based on Karpenter) creates nodes according to Pod requests; HPA, KEDA, and VPA are enabled
Pricing tier / SLADefault Free; Standard / Premium optionalPreconfigured Standard tier + API server SLA + Pod readiness SLA
Node OSUbuntu by default; Azure Linux or Windows optionalSystem pool: Azure Linux; user nodes: Azure Linux or Ubuntu; Windows not supported
NetworkingCLI default: Azure CNI Overlay (--network-plugin azure, mode defaults to overlay, data plane defaults to azure); Cilium, direct VNet, and BYO CNI optionalManaged VNet + Azure CNI Overlay powered by Cilium; bring your own VNet or private cluster optional
OutboundDefault load balancerManaged NAT gateway (with your own VNet, LB / NAT / UDR optional)
IngressOptionalFrom 1.36, new clusters default to the “application routing add-on + Gateway API” (previously managed NGINX)
Authentication and authorizationLocal accounts by default; Entra + K8s RBAC or Azure RBAC optionalPreset: Entra + Azure RBAC; the CLI automatically assigns “Azure Kubernetes Service RBAC Cluster Admin” to the creator at create time
API serverOptional VNet integrationPreset: API server VNet integration
SecurityOptionalPreset: Workload Identity + OIDC issuer, image cleaner, deployment safeguards + Baseline Pod Security Standard (enforce mode)
UpgradesManual by default; upgrade channels optionalPreset: cluster stable channel (upgrades to N-1) + node OS NodeImage channel; maintenance schedule configured by default
Node resource groupUnrestricted by default; ReadOnly lock optionalPreset: fully managed, cannot be changed
MonitoringOptionalCLI and portal enable Managed Prometheus and Container Insights by default at create time
Automatic limits (verified 2026-11): requires Azure CLI 2.86.0 or later; generally available in 46 regions (including canadacentral, canadaeast, eastus, westeurope, and others); new clusters always enable the managed system node pool and LocalDNS; Windows nodes are not supported; Dapr and Azure Machine Learning extensions are not supported; the locked node resource group prevents linking a VNet to the default private DNS zone (for cross-VNet or custom DNS scenarios, use a “private Automatic cluster with your own VNet” instead); converting from Base to Automatic is in preview in the 2026-10-25 release (the quickstart page still says “not supported,” so be conservative for production migrations). Register Microsoft.PolicyInsights in advance.

Why: why read each parameter one by one

Many AKS parameters can only be set at creation time. If you choose wrong, you have to rebuild the cluster or migrate to a new node pool. Below is a line-by-line breakdown of the command from the Module 1 lab:

ParameterValue in this hourDefault / notesCan it be changed after creation?
--tierfreeBase clusters default to FreeYes (az aks update)
--kubernetes-version1.36Omitted = regional default version (currently 1.36); minor version only = latest patchUpgrade only, no downgrade
--nodepool-namesystemDefault nodepool1; Linux pool names are 1–12 lowercase alphanumeric characters, starting with a letterNo
--node-count2Default 3; system pool at least 2, 3 recommended for productionYes (scale / autoscaling)
--node-vm-sizeStandard_D4s_v5If omitted, AKS picks dynamically based on capacity and quota (since 2025-05); system pool needs at least 4 vCPU and 4 GB; B-series not supportedNo (create a new pool to replace)
--zones1 2 3Availability zones are not used by defaultNo (create a new pool to replace)
--network-plugin / --network-plugin-modeazure / overlayCLI help: defaults to azure, mode defaults to overlay; kubenet will be retired on 2028-03-31Partly migratable (hour 2), generally treated as no
--pod-cidr192.168.0.0/16The Pod address space for Overlay must not overlap with any subnetNo
--service-cidr / --dns-service-ip10.0.0.0/16 / 10.0.0.10Same as default; the DNS IP must be within the Service CIDRNo
--enable-aad / --enable-azure-rbacEnabledLocal accounts + K8s RBAC by defaultOnce Entra integration is enabled, it cannot be turned off; Azure RBAC can be toggled
--enable-oidc-issuer / --enable-workload-identityEnabledWorkload Identity depends on the OIDC issuer (hour 3)Can be enabled; once the OIDC issuer is enabled, it cannot be turned off
--auto-upgrade-channelpatchnone|patch|stable|rapid|node-imageYes
--node-os-upgrade-channelNodeImageNone|Unmanaged|SecurityPatch|NodeImageYes
--generate-ssh-keysEnabledGenerates a key pair if ~/.ssh/id_rsa is missing; nodes still have no public IP—
--enable-managed-identity(default)New clusters use a system-assigned managed identity by default—
--no-waitEnabledDoes not wait for the long-running operation; use with az aks wait --created—

How: the 8 stages behind az aks create

  1. CLI: parses the parameters, fills in defaults, and uses the token from az login to send a PUT …/Microsoft.ContainerService/managedClusters/aks-lab?api-version=… request to https://management.azure.com. The request body is the cluster's desired state.
  2. ARM: validates the token → Azure RBAC checks managedClusters/write → evaluates Azure Policy (deny / modify / audit) → forwards to the AKS resource provider. It returns 201 immediately with an Azure-AsyncOperation header, which the CLI polls.
  3. AKS RP validation and preparation: checks that the version is available, the VM size and regional/zonal quota, and whether CIDRs conflict; writes provisioningState: Creating; creates the cluster managed identity and the node resource group MC_* (its managedBy points to the cluster).
  4. Control plane: starts etcd, the API server (issues certificates, registers the FQDN), the scheduler, and the controllers in Microsoft's subscription; configures Entra token validation (AKS-managed Entra integration) and the OIDC issuer.
  5. Infrastructure in the node resource group: managed VNet / subnet, NSG, the standard load balancer kubernetes and an outbound public IP, and the kubelet managed identity aks-lab-agentpool.
  6. VMSS and node bootstrap: creates a VMSS per node pool (AKS node image, zones 1/2/3). When the VMs start, the Custom Script Extension (CSE) configures containerd, the CNI binaries, and the kubelet bootstrap credentials.
  7. kubelet registration: kubelet uses the bootstrap credentials to connect out to the API server, completes TLS bootstrap, and creates the Node object. The node is NotReady at this point, waiting for the network plugin.
  8. System components and wrap-up: AKS deploys the kube-system components (azure-cns / CNI, kube-proxy, CoreDNS, konnectivity-agent, metrics-server, CSI drivers, cloud-node-manager, the Workload Identity webhook, and others). The nodes become Ready. The RP writes Succeeded, and the CLI prints the full JSON. If you passed --attach-acr, the CLI then creates the AcrPull role assignment for the kubelet identity using your permissions.

Differences for AKS Automatic: step 3 also applies the full set of presets; step 4 enables API server VNet integration; step 5 creates a managed NAT gateway instead of an outbound LB IP and locks MC_*; steps 6–7 run the system nodes in AKS's subscription (kubectl get nodes shows aks-hostedpool-*). Your subscription starts with no worker nodes. When the first Pod enters Pending, NAP (Node Auto Provisioning) creates a node. Go to the “Animation” tab to step through both paths.

Common misconceptions ① “If az aks create fails, nothing is left behind.” Parts that ARM already accepted can leave cluster resources in a Failed state and an MC_* group, so run az aks delete before retrying. ② “Automatic is just Standard with a few switches.” The system node pool is hosted in the AKS subscription, deployment safeguards are enforced, and MC_* is locked. Standard cannot fully replicate these. ③ “--attach-acr is done by the AKS RP.” The CLI makes the role assignment after creation finishes, using your identity, so you need a role such as Owner or User Access Administrator. ④ “Not being able to run privileged containers on Automatic is a bug.” Deployment safeguards plus the Baseline Pod Security Standard are preset, enforced policies.

Sequence diagram: from the CLI to a Ready node

az CLIARMAKS RPControl planeMC_* / VMSSkubelet / node PUT managedClusters RBAC + Policy passed 201 + AsyncOperation (polling) Start etcd / API server Create MC_*: VNet, NSG, LB, kubelet identity VMSS instances start + CSE bootstrap kubelet TLS bootstrap → register Node (NotReady) Schedule kube-system components (CNI, CoreDNS, konnectivity…) CNI ready → Node Ready provisioningState=Succeeded Final JSON Optional: --attach-acr → the CLI assigns AcrPull to the kubelet identity using your permissions
Figure 3-1: ARM only handles authentication, authorization, policy, and routing. The actual orchestration happens in the AKS RP. Nodes connect in on their own.

Structure comparison: resources created by Standard and Automatic

aks-lab (Standard / Base) MC_*: VMSS aks-system-* (2 × D4s_v5, your subscription) MC_*: load balancer kubernetes + outbound public IP MC_*: managed VNet + NSG (editable; locking recommended) Entra + Azure RBAC (enabled in this hour); local accounts still present Free pricing tier; upgrade channels patch + NodeImage (set in this hour) kubectl get nodes → aks-system-*-vmss00000x aks-lab-auto (Automatic) System nodes: hosted in the AKS subscription (aks-hostedpool-*) Worker nodes: created on demand by NAP (aksmanagednap in MC_*) MC_*: managed NAT gateway, Cilium Overlay, locked (read-only) Azure RBAC + deployment safeguards + Baseline PSS (enforced) Standard tier + Pod readiness SLA; stable + NodeImage channels Gateway API (application routing), KEDA, VPA, Managed Prometheus
Figure 3-2: both clusters are created by the same AKS RP. The difference is who owns the system nodes and which defaults are locked.

Core animation: what happens behind az aks create

Choose a cluster mode, then click “Next step” to watch how the request travels from your terminal to a Ready node. The terminal area below each step shows the real signals you can observe at that stage (API paths, resource names, events; all sample values).

az CLIYour terminal ARMRBAC + Policy AKS RPValidation / orchestration Control planeMicrosoft subscription MC_* resource groupVNet · LB · identity VMSS nodeskubelet registration System componentkube-system
Think about it after the animation. If the error is AuthorizationFailed, which step fails? What about QuotaExceeded? What about a node stuck in NotReady? Answers: ARM (step 2); AKS RP validation (step 3); kubelet has registered but the network plugin is not ready (steps 7–8). The Module 8 troubleshooting tree is organized in this same order.

Core commands and parameters

CommandPurposeKey parameters / notes
az aks createCreate a cluster--sku base|automatic, --tier, --kubernetes-version, --node-count, --node-vm-size, --zones, networking, identity, upgrade channel, --no-wait
az aks create --sku automaticCreate an Automatic clusterAdd --enable-hosted-system (managed system node pool; enabled by default on new clusters). With your own VNet, use --vnet-subnet-id and related flags.
az aks wait --createdWait for creation to finish--interval, --timeout
az aks show --query …ProfileCheck the configuration in effectnetworkProfile, agentPoolProfiles, aadProfile, oidcIssuerProfile, securityProfile, hostedSystemProfile
az aks deleteDelete the cluster and MC_*--yes --no-wait
az aks stop / startStop / start (control plane and nodes)No node VM charges while stopped; can stay stopped for up to 12 months
source ~/.aks-lab.env
az aks show -g $RG -n $CLUSTER --query "networkProfile.{plugin:networkPlugin, mode:networkPluginMode, dataplane:networkDataplane, podCidr:podCidr, serviceCidr:serviceCidr, dns:dnsServiceIp, outbound:outboundType, lb:loadBalancerSku}" -o yaml
az aks show -g $RG -n $CLUSTER --query "{aad:aadProfile.managed, azureRbac:aadProfile.enableAzureRbac, localAccountsDisabled:disableLocalAccounts, oidc:oidcIssuerProfile.issuerUrl, wi:securityProfile.workloadIdentity.enabled}" -o yaml
dataplane: azure
dns: 10.0.0.10
lb: standard
mode: overlay
outbound: loadBalancer
plugin: azure
podCidr: 192.168.0.0/16
serviceCidr: 10.0.0.0/16
aad: true
azureRbac: true
localAccountsDisabled: false
oidc: https://canadacentral.oic.prod-aks.azure.com/<tenant-id>/<guid>/
wi: true

AKS Automatic

az aks create -g $RG -n ${CLUSTER}-auto -l $LOC \
  --sku automatic \
  --enable-hosted-system
az aks show -g $RG -n ${CLUSTER}-auto --query "{sku:sku, hosted:hostedSystemProfile.enabled, autoUpgrade:autoUpgradeProfile}" -o yaml
autoUpgrade:
  nodeOsUpgradeChannel: NodeImage
  upgradeChannel: stable
hosted: true
sku:
  name: Automatic
  tier: Standard

Note: In the official quickstart, the command on the --sku automatic line is missing the line-continuation character \. Copying it as-is would treat --enable-hosted-system as a separate command. This hour's version is corrected.

Lab 3: verify a Standard cluster and try Automatic (about 15 minutes; the Automatic part is optional)

Verify the actual configuration of aks-lab: run the two az aks show commands from the “Commands” tab and check each value against the parameter table. Then check the node pools:
az aks nodepool show -g $RG --cluster-name $CLUSTER -n system \
  --query "{mode:mode, count:count, vm:vmSize, zones:availabilityZones, os:osSku, maxPods:maxPods, vmset:type}" -o yaml
count: 2
maxPods: 250
mode: System
os: Ubuntu
vm: Standard_D4s_v5
vmset: VirtualMachineScaleSets
zones:
- '1'
- '2'
- '3'

With Azure CNI Overlay, each node runs up to 250 Pods by default. Pod IPs come from 192.168.0.0/16 and do not use VNet addresses.

Check the events left behind by creation
kubectl get events -A --sort-by=.lastTimestamp | grep -E 'RegisteredNode|NodeReady|Starting kubelet' | head
kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"  "}{.metadata.labels.kubernetes\.azure\.com/node-image-version}{"\n"}{end}'

Events may already have expired (they are kept for 1 hour by default). The node label kubernetes.azure.com/node-image-version records the node image the VMSS uses.

(Optional, extra cost) Create the Automatic cluster aks-lab-auto: requires CLI 2.86 or later. About 10 minutes.
az version --query '"azure-cli"' -o tsv
az aks create -g $RG -n ${CLUSTER}-auto -l $LOC --sku automatic --enable-hosted-system
az aks get-credentials -g $RG -n ${CLUSTER}-auto --context aks-lab-auto
kubectl --context aks-lab-auto get nodes
NAME                           STATUS   ROLES    AGE   VERSION
aks-hostedpool-16652789-vms1   Ready    <none>   9m    v1.36.5
aks-hostedpool-16652789-vms2   Ready    <none>   9m    v1.36.5
aks-hostedpool-16652789-vms3   Ready    <none>   9m    v1.36.5
aks-system-surge-zq4d2         Ready    <none>   9m    v1.36.5

What you see are the managed system nodes (in the AKS subscription). The MC_rg-aks-lab_aks-lab-auto_canadacentral group has no VMSS for system nodes.

(Optional) Trigger NAP and test deployment safeguards
kubectl --context aks-lab-auto create deployment web --image=mcr.microsoft.com/azuredocs/aks-helloworld:v1 --replicas=2
kubectl --context aks-lab-auto get pods -w        # Pending first, then Running once NAP creates a node (Ctrl+C to exit)
kubectl --context aks-lab-auto get nodes -L karpenter.sh/nodepool
kubectl --context aks-lab-auto run priv --image=busybox --overrides='{"spec":{"containers":[{"name":"priv","image":"busybox","command":["sleep","3600"],"securityContext":{"privileged":true}}]}}'
Warning: [azurepolicy-k8sazurev3containerlimits-…] container <aks-helloworld> has no resource limits
…
Error from server (Forbidden): admission webhook "validation.gatekeeper.sh" denied the request: [azurepolicy-k8sazurev2noprivilege-…] Privileged container is not allowed: priv, securityContext: {"privileged": true}
Clean up the Automatic cluster (keep aks-lab):
az aks delete -g $RG -n ${CLUSTER}-auto --yes --no-wait
kubectl config delete-context aks-lab-auto

Case 1: Pod CIDR conflicts with a company network range, so the cluster must be rebuilt

Problem: A team created a cluster with the default Pod CIDR. Six months later, an on-premises range connected through ExpressRoute happened to overlap with it, and return traffic from Pods to on-premises services was misrouted. Approach: Create a new cluster and migrate the workloads. In the platform template, have IPAM assign Pod and Service CIDRs centrally (this hour uses Pod 192.168.0.0/16 and Service 10.0.0.0/16). Limitation: the Pod CIDR, Service CIDR, and node subnet cannot be changed after creation (hour 2).

Case 2: A new team goes straight to AKS Automatic

Problem: A team of three developers needs to launch a Web API and has no dedicated platform engineer. Approach: Choose AKS Automatic. System nodes are managed, NAP creates nodes on demand, patching is automatic, and deployment safeguards enforce best practices. The team only maintains Deployments and HTTPRoutes. Limitation: the Dapr extension they had planned to use is not supported on Automatic, so they call the Azure SDK directly instead. If they need Windows nodes later, they must create a separate Standard cluster.

Case 3: Policy blocks cluster creation

Problem: az aks create in CI fails with RequestDisallowedByPolicy. The company policy requires all clusters to disable local accounts and enable Defender. Approach: Add parameters such as --disable-local-accounts to the template to meet the policy, and sync the policy definition into the platform team's “cluster template” documentation. Limitation: ARM-level policy denials happen before the AKS RP is reached. The error message only shows the policy assignment name, so you need to check the rule details in the policy portal.

Common errors and fixes

(QuotaExceeded) Operation could not be completed as it results in exceeding approved standardDSv5Family Cores quota

Cause: In step 3, the AKS RP validation failed on the regional vCPU quota. Note that surge upgrades need extra quota as well.

az vm list-usage -l $LOC --query "[?contains(name.value,'DSv5')]" -o table

Fix: Request more quota, or switch to a VM family or region that has quota.

(SkuNotAvailable) The requested VM size Standard_D4s_v5 is not available in zone '3' / for subscription

Cause: This VM size is restricted in a zone or for your subscription (capacity limits).

az vm list-skus -l $LOC --size Standard_D4s_v5 --query "[].{zones:locationInfo[0].zones, restrictions:restrictions}" -o json

Fix: Change the zone combination or VM size, or omit --node-vm-size and let AKS choose based on capacity.

(RequestDisallowedByPolicy) Resource 'aks-lab' was disallowed by policy.

Cause: In step 2, ARM evaluated Azure Policy and a deny policy rejected the request.

az policy assignment list -g $RG --disable-scope-strict-match -o table

Fix: Add the parameters the policy requires, or ask the policy owner for an exemption.

unrecognized arguments: --sku automatic / --enable-hosted-system

Cause: Azure CLI is too old. Automatic requires 2.86.0 or later.

az version; az upgrade --yes
provisioningState: Failed (creation failed midway)

Cause: A later step failed (for example, a VMSS extension failed, or outbound traffic was blocked by a firewall so nodes could not pull components).

az aks show -g $RG -n $CLUSTER --query "{state:provisioningState, power:powerState.code}"
az monitor activity-log list -g $RG --offset 2h --status Failed --query "[].{op:operationName.value, msg:properties.statusMessage}" -o json | head -40

Fix: Address the error code, then run az aks update -g $RG -n $CLUSTER (reconcile with no parameters) or delete and recreate the cluster. If node outbound traffic is restricted, check the UDR and firewall rules (hours 2 and 7).

Command-line exercises
1. Create a minimal Automatic cluster named aks-lab-auto (using the managed system node pool).
az aks create -g $RG -n aks-lab-auto -l $LOC --sku automatic --enable-hosted-system
2. Query the network plugin, mode, Pod CIDR, and outbound type of aks-lab.
az aks show -g $RG -n $CLUSTER --query "networkProfile.{p:networkPlugin,m:networkPluginMode,pod:podCidr,out:outboundType}" -o table
Scenario analysis
A company needs to provide Kubernetes to 12 product teams. Nine teams run Linux Web/API services, two teams need Windows containers, and one team depends on the Dapr extension. How would you divide the teams between Standard and Automatic?

Nine Linux Web/API teams: use AKS Automatic first (managed system nodes, NAP, automatic patching, deployment safeguards, Pod readiness SLA). The platform team only maintains namespaces, quotas, and CI templates. Windows teams: Automatic does not support Windows nodes, so use AKS Standard (Standard tier + availability zones + a Windows user node pool + an automatic upgrade channel). Dapr team: Automatic does not support the Dapr extension, so use Standard and install the Dapr extension, or evaluate switching to the Azure SDK and then moving to Automatic. Both cluster types should use IaC templates (hour 5) to standardize network CIDRs, Entra authorization, policy, and monitoring, to avoid “snowflake clusters.”

Verified teaching videos

▶
From zero to Kubernetes with AKS Automatic | BRK121 — Microsoft Events
English · Ignite breakout session on Automatic's design goals and demos
▶
What is AKS Automatic? A full features Guide for AKS Automatic - Azure Kubernetes Service — Azure Kubernetes Service (AKS)
English · feature overview from the official AKS channel (recorded during preview; for newer changes such as the managed system node pool, follow this hour)
▶
Kubernetes the Easy Way with AKS Automatic — Azure Kubernetes Service (AKS)
English · livestream replay
▶
Introduction to AKS Automatic — Houssem Dellai
English · creation and comparison demo

Official docs

Video storyboard (about 100 seconds, matching the core animation)

Shot 1 · 0–15s
Visual: a terminal runs az aks create, and an envelope marked PUT flies toward the ARM gate.
Narration: One az aks create command is really a PUT request to Azure Resource Manager. The request body is the cluster's desired state.
Shot 2 · 15–35s
Visual: three checkpoints at the ARM gate: token, RBAC, and Policy. Once the envelope passes, it is handed to the AKS resource provider, and the CLI gets a “queue number.”
Narration: ARM only handles authentication, authorization, and policy checks. It then hands the request to the AKS resource provider, and the CLI starts polling the asynchronous operation.
Shot 3 · 35–65s
Visual: on the left, a control plane rises inside Microsoft's cloud. On the right, in the MC_ resource group, a VNet, a load balancer, a managed identity, and a VMSS appear one after another.
Narration: The resource provider starts the control plane in Microsoft's subscription, and creates the node resource group and the virtual machine scale set in your subscription.
Shot 4 · 65–90s
Visual: VMs boot, and kubelet presents its certificate to the API server. The node changes from gray to yellow to green.
Narration: The nodes connect in on their own. kubelet completes bootstrap and registers the node, then it becomes Ready once the network plugin is ready.
Shot 5 · 90–100s
Visual: switch to Automatic. The system nodes float into AKS's cloud, and your resource group is empty until the first Pod appears, at which point NAP creates a node.
Narration: Automatic places the system nodes in AKS's own subscription, and your worker nodes appear on demand.
or score ≥ 70% on the quiz

Module 4 · Node pools: system and user

21:00 – 28:00 · Keep CoreDNS and your apps apart: one mode field, one label, one taint
7 minmode: System | UserCriticalAddonsOnly★★★★☆
Learning goals
  • Explain the node pool concept (a set of nodes with the same configuration, usually backed by one VMSS) and the purpose and limits of the System and User modes.
  • Use the CriticalAddonsOnly=true:NoSchedule taint to isolate the system pool, and explain how the kubernetes.azure.com/mode label that AKS applies automatically works with the tolerations of system components.
  • Use az aks nodepool add / update / scale / delete fluently, and know which properties can only change through “new pool + migration.”
Prerequisites: taints, tolerations, nodeSelector, and affinity from the Kubernetes hour. Importance: ★★★★☆

What: node pools and modes

AKS groups nodes with identical configuration (VM size, OS, availability zones, max Pods, labels, taints, Kubernetes version) into a node pool, usually backed by one virtual machine scale set (VMSS). AKS also supports “Virtual Machines node pools,” where AKS manages individual VMs directly. Each node pool has a required mode:

System node poolUser node pool
PurposeRuns critical system Pods: CoreDNS, konnectivity-agent, metrics-server, and othersRuns your applications
OSLinux only (Ubuntu or Azure Linux)Linux or Windows
Node countAt least 2; 3 recommended for production (with availability zones)0 or more (can scale to 0)
VM sizeAt least 4 vCPU and 4 GB memory; B-series not supported; large clusters: 3 × 8 vCPU or 2 × 16 vCPU recommendedChoose based on workload
Max PodsAt least 30Depends on network model
SpotNot allowedAllowed (hour 4)
Count rulesAt least 1 per cluster; another system pool must exist before you can delete a system poolAny number
Automatic labelkubernetes.azure.com/mode: systemkubernetes.azure.com/mode: user
DefaultThe first pool created by az aks createWhen az aks nodepool add is run without --mode

Why: why isolate them

  • System Pods are a single point of failure for the whole cluster. If CoreDNS is squeezed out, all service discovery fails. If konnectivity-agent is evicted, kubectl logs/exec stops working. An application Pod without limits that consumes all the memory can take down CoreDNS on the same node.
  • A label is not isolation. The mode: system label only makes AKS system components prefer the system pool. It does not stop your applications from being scheduled there. Real isolation comes from the CriticalAddonsOnly=true:NoSchedule taint. AKS system components have a matching toleration, and ordinary applications do not.
  • Mix sizes as needed. The system pool uses a stable general-purpose size. User pools can be memory-optimized, GPU, Spot, or Windows, and each one scales and upgrades independently.

How: how scheduling is kept separate

  1. Add a taint to the system pool: az aks nodepool update … --node-taints CriticalAddonsOnly=true:NoSchedule (or --nodepool-taints at creation time).
  2. AKS-managed system components (CoreDNS, metrics-server, konnectivity-agent, and others) have a CriticalAddonsOnly toleration and a preferred affinity for kubernetes.azure.com/mode=system, so they stay on the system pool.
  3. DaemonSet-type components (CNI, kube-proxy, CSI node plugins, cloud-node-manager) tolerate all taints, so they run on every node.
  4. Your applications have no toleration, so they can only go to user pools. If the user pool has 0 nodes or does not exist, the Pod stays Pending (event: untolerated taint {CriticalAddonsOnly: true}).
  5. For stronger constraints, add nodeSelector: kubernetes.azure.com/mode: user to the application, or select by pool name with kubernetes.azure.com/agentpool: userpool.
Changing the mode does not move Pods. Changing a pool from System to User, or adding a new system pool, does not automatically migrate system Pods that are already running. System Pods are only rescheduled to the new system pool, based on preference, when the old pool is deleted or scaled down. Likewise, adding a taint to existing nodes only affects future scheduling (NoSchedule does not evict running Pods). Use a rolling restart to move applications off.

When: which properties can be changed and which require a new pool

Can be changed in placeRequires a new pool and migration
Node count (scale), autoscaling min/max, mode (System ↔ User, when the rules allow), labels, taints, Kubernetes version and node image (upgrade), max surgeVM size, availability zones, OS type, OS disk type and size, subnet, max Pods (maxPods), pool name

The standard way to replace a pool: nodepool add a new pool → kubectl cordon and drain the old pool's nodes (subject to PDBs) → verify → nodepool delete the old pool.

Common misconceptions ① “There can be only one system pool.” You can have several, with at least one. ② “User pools cannot run system Pods.” They can. AKS just prefers the system pool, so in production make sure the system pool has enough capacity. ③ “Adding a taint kicks applications out immediately.” NoSchedule only affects new scheduling. ④ “Automatic clusters also require you to create a system pool yourself.” The Automatic system node pool is managed by AKS, and NAP creates the worker nodes automatically.

Diagram: aks-lab after adding a user pool

system (mode: System) · VMSS · 2 × D4s_v5 Taint CriticalAddonsOnly=true:NoSchedule · label kubernetes.azure.com/mode=system Node (zone 1) corednskonnectivity-agentmetrics-server DaemonSet:azure-cns · kube-proxycsi-azuredisk-nodecloud-node-manager Node (zone 2) corednskonnectivity-agentDaemonSet (same as left) userpool (mode: User) · VMSS · 2 × D2s_v5 No taint · label kubernetes.azure.com/mode=user · workload=apps Node (zone 1) myappredisDaemonSet (same as left) Node (zone 2) myappDaemonSet (same as left)
Figure 4-1: System components with tolerations stay on the left. Applications without tolerations can only go to the right. DaemonSets tolerate everything and run on every node.

Decision diagram: where a new Pod lands

New PodHas CriticalAddonsOnly toleration? Can go to any poolPrefers mode=system → system pool Can only go to untainted poolsAre there user pool nodes? Scheduled to user pool Pending: untolerated taint {CriticalAddonsOnly: true} Yes No Yes No
Figure 4-2: a taint is a “gate”; a mode label is just a “signpost”

Interactive: scheduling simulator

Toggle the system pool taint, whether the user pool exists, and whether the app has a nodeSelector. Click “Schedule” to see where each Pod lands. (The logic matches kube-scheduler filtering and scoring, simplified.)

system pool
userpool
Pending

Core commands and parameters

CommandPurposeKey parameters / notes
az aks nodepool addCreate a node pool--mode System|User (default User), --node-count (default 3), --node-vm-size, --zones, --labels, --node-taints, --os-type, --os-sku, --max-pods, --priority Spot
az aks nodepool updateModify mutable properties--mode, --labels, --node-taints (pass an empty string "" to clear), --enable-cluster-autoscaler --min-count --max-count, --max-surge
az aks nodepool scaleManual scaling--node-count; pools with autoscaling enabled cannot be scaled manually
az aks nodepool list / showView pools--query "[].{n:name,mode:mode,count:count,vm:vmSize}"
az aks nodepool deleteDelete a poolA system pool requires another system pool to exist; nodes are cordoned/drained
kubectl get nodes -L …View nodes by labelkubernetes.azure.com/mode, kubernetes.azure.com/agentpool, topology.kubernetes.io/zone
az aks nodepool add -g $RG --cluster-name $CLUSTER -n userpool \
  --mode User --node-count 2 --node-vm-size Standard_D2s_v5 --zones 1 2 3 \
  --labels workload=apps
az aks nodepool update -g $RG --cluster-name $CLUSTER -n system \
  --node-taints CriticalAddonsOnly=true:NoSchedule
az aks nodepool list -g $RG --cluster-name $CLUSTER \
  --query "[].{name:name, mode:mode, count:count, vm:vmSize, taints:nodeTaints}" -o table
Name      Mode    Count    Vm               Taints
--------  ------  -------  ---------------  ------------------------------------
system    System  2        Standard_D4s_v5  ['CriticalAddonsOnly=true:NoSchedule']
userpool  User    2        Standard_D2s_v5  None
kubectl get nodes -L kubernetes.azure.com/mode,kubernetes.azure.com/agentpool,topology.kubernetes.io/zone
kubectl get deploy coredns -n kube-system -o jsonpath='{.spec.template.spec.tolerations}' | jq
NAME                               STATUS   ROLES    AGE   VERSION   MODE     AGENTPOOL   ZONE
aks-system-12345678-vmss000000     Ready    <none>   40m   v1.36.5   system   system      canadacentral-1
aks-system-12345678-vmss000001     Ready    <none>   40m   v1.36.5   system   system      canadacentral-2
aks-userpool-87654321-vmss000000   Ready    <none>   4m    v1.36.5   user     userpool    canadacentral-1
aks-userpool-87654321-vmss000001   Ready    <none>   4m    v1.36.5   user     userpool    canadacentral-2
[
  { "key": "CriticalAddonsOnly", "operator": "Exists" },
  …
]

How to verify: CoreDNS's tolerations include CriticalAddonsOnly. Common error: writing the taint as CriticalAddonsOnly=true:NoExecute evicts Pods without the toleration immediately (including any application you accidentally placed on the system pool). Use NoSchedule in general.

Lab 4: split the system and user pools (about 10 minutes)

Cost: adds 2 × D2s_v5, about +0.2 USD/hour. Role: Contributor on the cluster resource (or Azure Kubernetes Service Contributor Role).

Before adding the taint, put a “noisy neighbor” on the system pool
kubectl create ns demo
kubectl -n demo create deployment noisy --image=mcr.microsoft.com/azurelinux/base/core:3.0 --replicas=2 -- sleep infinity
kubectl -n demo get pods -o wide

Right now there is only the system pool, so application Pods can only land on system nodes. That is exactly what we want to avoid.

Add a user pool and taint the system pool: run the first three commands from the “Commands” tab (adding the user pool takes about 3–5 minutes).
Observe: NoSchedule does not evict existing Pods
kubectl -n demo get pods -o wide             # still on aks-system-*
kubectl -n demo rollout restart deploy/noisy
kubectl -n demo rollout status deploy/noisy
kubectl -n demo get pods -o wide             # new Pods are all on aks-userpool-*
Trigger a Pending: scale the user pool to 0
az aks nodepool scale -g $RG --cluster-name $CLUSTER -n userpool --node-count 0
kubectl -n demo rollout restart deploy/noisy
kubectl -n demo get pods
kubectl -n demo describe pod -l app=noisy | grep -A3 Events
NAME                     READY   STATUS    RESTARTS   AGE
noisy-6d5f7c9b8d-4kq2x   0/1     Pending   0          20s
…
  Warning  FailedScheduling  20s  default-scheduler  0/2 nodes are available: 2 node(s) had untolerated taint {CriticalAddonsOnly: true}. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling.
Restore
az aks nodepool scale -g $RG --cluster-name $CLUSTER -n userpool --node-count 2
kubectl -n demo get pods -w     # press Ctrl+C after Running
kubectl delete ns demo
(Think about it) Why can't you scale the system pool to 1 or 0?
az aks nodepool scale -g $RG --cluster-name $CLUSTER -n system --node-count 0

The system pool cannot be 0 (the request is rejected), and production should not run fewer than 2–3 nodes. Do not actually scale it to 1.

Case 1: a memory leak takes CoreDNS down with it

Problem: The cluster had only one system pool, and all applications ran on it. One service leaked memory, which caused node memory pressure and triggered evictions. After a CoreDNS replica was evicted, the node hosting the other replica also ran short on resources, and DNS resolution timed out cluster-wide. Approach: Add a user pool, add the CriticalAddonsOnly taint to the system pool, and do a rolling restart of all applications. Enforce requests/limits on applications (Policy, hour 3). Limitation: size the system pool for the system components' needs. AKS recommends at least 3 × 8 vCPU for large clusters.

Case 2: change VM size by moving to a new pool

Problem: The user pool on D2s_v5 is short on memory, and the team wants to switch to E4s_v5. VM size cannot be changed in place. Approach: Add userpool2 (E4s_v5, same labels), cordon the old pool's nodes, drain them one at a time (PDBs keep the service available), and delete the old pool after you check the metrics. Limitation: both pools are billed during the migration, and you need extra vCPU quota.

Case 3: the lesson of making the system pool Spot

Problem: To save money, someone tried to change the only pool to Spot. Approach: AKS rejects it directly, because Spot is only allowed on user pools. The final design is “a small on-demand system pool + an autoscaling Spot user pool + an on-demand user pool as fallback” (hour 4). Limitation: Spot nodes can be reclaimed at any time, so use Spot only for interruptible workloads.

Common errors and fixes

0/2 nodes are available: 2 node(s) had untolerated taint {CriticalAddonsOnly: true}

Cause: The system pool has a taint, and the user pool does not exist, has 0 nodes, or lacks resources.

az aks nodepool list -g $RG --cluster-name $CLUSTER --query "[].{n:name,mode:mode,count:count}" -o table
kubectl describe pod POD -n NS | sed -n '/Events/,$p'

Fix: Scale up or add a user pool. Do not “fix” this by adding the CriticalAddonsOnly toleration to your application.

(OperationNotAllowed) … must have at least one system pool / Cannot delete the last system node pool

Cause: The cluster needs at least one system pool. Changing the only system pool to User or deleting it is rejected.

Fix: First create a new system pool with az aks nodepool add --mode System, then change or delete the old pool.

(InvalidParameter) … VM size '…' is not supported for System node pools (the VM size does not meet system pool requirements)

Cause: The VM size does not meet the minimum system pool requirements (at least 4 vCPU and 4 GB, and not a B-series size). The exact error text varies by API version.

Fix: Choose a size such as D4s_v5 for the system pool. Use smaller sizes only for user pools.

(InvalidParameter) The value of parameter agentPoolProfile.name is invalid

Cause: Pool names must start with a lowercase letter and contain only lowercase letters and digits. Linux names can be 1–12 characters, and Windows names 1–6 characters. user-pool and UserPool are both invalid.

Command-line exercises
1. Create a dedicated system pool named sys2 (3 nodes, with the CriticalAddonsOnly taint).
az aks nodepool add -g $RG --cluster-name $CLUSTER -n sys2 --mode System --node-count 3 --node-vm-size Standard_D4s_v5 --zones 1 2 3 --node-taints CriticalAddonsOnly=true:NoSchedule
2. Remove all taints from the system pool.
az aks nodepool update -g $RG --cluster-name $CLUSTER -n system --node-taints ""
Scenario analysis
The cluster currently has only one system pool, nodepool1 (3 × D2s_v5), which runs all applications. You need to convert it to a dedicated system pool plus user pools without interrupting the business, and change the system pool to D4s_v5. Write out the steps.

① Create a system pool system (D4s_v5, 3 nodes, zones 1/2/3, taint CriticalAddonsOnly); ② create a user pool userpool (size based on application needs; autoscaling can be enabled); ③ change nodepool1 to User mode (another system pool now exists); ④ after confirming that the applications have PDBs and multiple replicas, run kubectl cordon and drain nodepool1's nodes one at a time. Move the applications to userpool and the system components to system; ⑤ check that CoreDNS and metrics-server are running on the system pool and that the applications are healthy; ⑥ delete nodepool1. The whole process needs extra vCPU quota.

Verified teaching videos

▶
Azure Kubernetes Services (AKS) Node Pools explained in plain English — cloud-monk - cloud in plain english
English · System and user node pool concepts
▶
Kubernetes Nodepools explained — Houssem Dellai
English · demo of multiple node pools with taints and nodeSelector (recorded earlier; for minimum size requirements, follow this hour)

Official docs

Video storyboard (about 80 seconds)

Shot 1 · 0–20s
Visual: an apartment building. The left half has a “System” sign, where CoreDNS and metrics-server live. The right half is “User,” where myapp lives.
Narration: A node pool is a group of nodes with the same configuration. The system pool hosts the cluster's critical components. The user pool hosts your applications.
Shot 2 · 20–45s
Visual: a gate appears at the entrance to the left half, labeled CriticalAddonsOnly. CoreDNS goes through with a pass. myapp is blocked outside and walks over to the right.
Narration: Mode labels are just signposts. The real access control is the taint. System components carry a toleration. Your application does not.
Shot 3 · 45–65s
Visual: the lights in the right half go out (the user pool is scaled to 0). myapp stands on the street, and a Pending label appears above its head.
Narration: If the user pool has no nodes, the application goes Pending. The event says untolerated taint.
Shot 4 · 65–80s
Visual: a construction crew builds a new building next door. Residents move over one by one, and the old building is torn down.
Narration: Properties such as VM size and availability zone cannot be changed. You create a new node pool, drain the old one, and then delete it.
or score ≥ 70% on the quiz

Module 5 · Access the cluster: kubeconfig, Entra authentication, and kubelogin

28:00 – 35:00 · kubeconfig no longer stores a password. It stores where to get a token. Azure role assignments decide who can do what.
7 minMicrosoft Entra IDkubelogin v0.2.22★★★★★
Learning goals
  • Distinguish the three kinds of kubeconfig AKS offers: Entra user credentials (exec plugin), local user credentials, and local admin credentials (--admin), and explain the risk of each.
  • Walk through the authentication and authorization path of one kubectl get pods: kubectl → kubelogin → Entra (audience 6dae42f8-4368-4678-94ff-3960e28e3630) → API server validates the token → Azure RBAC / Kubernetes RBAC.
  • Use the 4 built-in roles to authorize at cluster or namespace scope, use kubelogin convert-kubeconfig to choose the sign-in method, and enable --disable-local-accounts. Know the break-glass procedure.
Prerequisites: kubeconfig, RBAC, and kubectl auth can-i from the Kubernetes hour. Importance: ★★★★★

What: how authentication and authorization combine in AKS

CombinationAuthentication (who you are)Authorization (what you can do)How to enableUse case
Local accounts + K8s RBACCertificate / token (static credential in kubeconfig)RoleBindingDefault for StandardLabs only
Entra + K8s RBACEntra tokenRoleBinding binds an Entra user / group object ID--enable-aadTeam knows K8s RBAC and needs fine-grained Roles
Entra + Azure RBACEntra tokenAzure role assignment (cluster or namespace scope); K8s RBAC also applies at the same time--enable-aad --enable-azure-rbacManage permissions centrally in Azure; preset on AKS Automatic

Whichever combination you use, Kubernetes itself does not store users. With Entra enabled, the API server receives a JWT issued by Entra, and both the username and the groups (object IDs) come from the token. Once Entra integration is enabled, it cannot be turned off.

Why: why use kubelogin and disable local accounts

  • A static credential cannot be revoked for one person: --admin gives you a cluster-admin client certificate signed by the cluster CA. Whoever has it is an administrator. When someone leaves, you cannot revoke that one certificate; you can only rotate the whole cluster's certificates.
  • Entra adds conditional access, MFA, and auditing: tokens expire, access can be granted by group, and the audit log shows real users.
  • kubectl does not sign in to Entra by itself: it uses client-go's exec credential plugin mechanism to call kubelogin. kubelogin completes the OAuth flow and hands the token to kubectl. For AKS clusters on Kubernetes 1.24 and later, az aks get-credentials writes the exec format automatically.

How: the exec section and token in kubeconfig

users:
- name: clusterUser_rg-aks-lab_aks-lab
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1beta1
      command: kubelogin
      args:
      - get-token
      - --login
      - azurecli                       # after convert-kubeconfig -l azurecli; get-credentials usually starts with devicecode
      - --server-id
      - 6dae42f8-4368-4678-94ff-3960e28e3630   # AKS server app: the token audience (aud)
      interactiveMode: IfAvailable
      provideClusterInfo: false
kubelogin mode -lUse caseNotes
devicecodeDefault modeOpens microsoft.com/devicelogin where you enter a code. Not available when the tenant enables conditional access; use interactive instead.
interactiveDesktop browserLocal callback; complies with conditional access; supports PoP tokens
azurecliWorkstation or Cloud Shell that already ran az loginReuses az's token cache; kubelogin does not write its own cache. Recommended for daily use.
spnCI (service principal + secret/certificate)Provided through the AZURE_CLIENT_ID/AZURE_CLIENT_SECRET environment variables
msiAzure VMs, self-hosted runnersSystem-assigned or user-assigned managed identity
workloadidentityGitHub Actions OIDC, Argo CD, and other federated credentialsReads AZURE_FEDERATED_TOKEN_FILE
azd / azurepipelinesAzure Developer CLI / Azure Pipelines service connectionSee the Azure DevOps course

Tokens for devicecode and interactive are cached in ${HOME}/.kube/cache/kubelogin. Clear them with kubelogin remove-cache-dir. The AKS public client app ID is 80faf920-1908-4b52-b5ef-a8e7bedfc67a (used by devicecode / interactive). kubelogin does not support password flows other than ROPC, and ROPC is not recommended.

The 4 built-in Azure RBAC data-plane roles

RoleWhat it can doTypical scope
Azure Kubernetes Service RBAC ReaderReads most objects in a namespace; cannot read Secrets, Role, or RoleBindingNamespace
Azure Kubernetes Service RBAC WriterReads and writes most objects, and can read and write Secrets; cannot change Role or RoleBindingNamespace
Azure Kubernetes Service RBAC AdminNamespace admin, including Role and RoleBindingNamespace
Azure Kubernetes Service RBAC Cluster AdminCluster-wide superuserCluster

These 4 are data-plane roles (access to the Kubernetes API). To run az aks get-credentials and download the kubeconfig, a user also needs the control-plane action listClusterUserCredential, which is usually granted through Azure Kubernetes Service Cluster User Role. Scope examples: cluster $AKS_ID, namespace $AKS_ID/namespaces/myapp.

When: disabling local accounts and break-glass

  • az aks update --disable-local-accounts: after this, get-credentials --admin is rejected, and all access must go through Entra. This is a standard requirement for production clusters, and many organizations enforce it with Azure Policy.
  • Entra admin group (--aad-admin-group-object-ids): group members get cluster-admin. If you delete the group or enter the wrong ID, fix it with az aks update --aad-admin-group-object-ids using an account that has managedClusters/write. No break-glass is needed.
  • break-glass (when Entra sign-in itself is unavailable, for example during a large-scale Entra outage): a person with the Azure Kubernetes Service Contributor role temporarily runs --enable-local-accounts → get-credentials --admin → does the work → immediately runs --disable-local-accounts again. This path is authorized by ARM and does not depend on Entra sign-in to the API server.
Common misconceptions ① “I'm the subscription Owner, so I can definitely use kubectl.” Owner is a control-plane permission. With Azure RBAC enabled, access to the Kubernetes API requires a data-plane role (an Owner can assign one to themselves). ② “A leaked kubeconfig means the cluster is compromised.” An Entra kubeconfig contains no secret, only “where to get a token.” The dangerous part is the --admin certificate. ③ “devicecode always works.” It does not work under conditional access. ④ “After disabling local accounts you can never get back in.” There is a break-glass procedure, as long as you plan ahead for who holds the AKS Contributor role.

Flow diagram: identity path for one kubectl get pods

kubectlRead kubeconfig kubeloginexec plugin Microsoft Entra IDMFA / conditional access API serverToken validation (authentication) AuthorizationAzure RBAC webhook+ Kubernetes RBAC Admission → etcdReturn result exec OAuth JWT aud=6dae42f8… ExecCredential (stdout) HTTPS + Authorization: Bearer <JWT> User + group OIDs --admin path (local accounts)Client certificate embedded in kubeconfig, cluster-adminBypasses Entra; rejected after --disable-local-accounts
Figure 5-1: authentication happens in Entra and is validated at the API server; authorization succeeds if either Azure RBAC or K8s RBAC allows the request.

Scope diagram: where Azure role assignments apply

Cluster /subscriptions/…/managedClusters/aks-lab — RBAC Cluster Admin (you) · Cluster User Role (developers, to download the kubeconfig) …/aks-lab/namespaces/myappRBAC Writer → group myapp-devsRBAC Reader → group support …/aks-lab/namespaces/kube-systemNo assignment → developers get 403Only Cluster Admin can write
Figure 5-2: namespace-scoped role assignments let “multiple teams in one cluster” work without writing a single RoleBinding.

Animation: the full authentication and authorization path for one kubectl get pods -n myapp

Choose a scenario and step through to see where the request is allowed or denied.

kubectlkubeconfig kubeloginexec plugin Entra IDIssue JWT API serverAuthentication AuthorizationAzure / K8s RBAC Result—

Core commands and parameters

CommandPurposeKey parameters / notes
az aks get-credentialsWrite to kubeconfig--overwrite-existing, --context NAME, --file PATH, --admin (local admin certificate), --format exec|azure
kubelogin convert-kubeconfig -l MODEChange the sign-in method in the exec sectiondevicecode (default) / interactive / azurecli / spn / msi / workloadidentity / azd / azurepipelines
kubelogin remove-cache-dirClear token cacheWhen switching accounts or when the token is broken
az role assignment createGrant a data-plane role--role "Azure Kubernetes Service RBAC Reader|Writer|Admin|Cluster Admin", --scope $AKS_ID[/namespaces/NS], --assignee-object-id, --assignee-principal-type User|Group|ServicePrincipal
az aks update --disable-local-accountsDisable local accountsReverse: --enable-local-accounts
az aks update --aad-admin-group-object-idsSet Entra admin groupsSeparate multiple object IDs with commas
kubectl auth whoami / auth can-iVerify identity and permissionscan-i --list -n NS
kubectl config view --minify -o jsonpath='{.users[0].user.exec.args}'; echo
kubelogin convert-kubeconfig -l azurecli
kubectl auth whoami
["get-token","--environment","AzurePublicCloud","--server-id","6dae42f8-4368-4678-94ff-3960e28e3630","--client-id","80faf920-1908-4b52-b5ef-a8e7bedfc67a","--tenant-id","aaaabbbb-…","--login","devicecode"]
ATTRIBUTE                                           VALUE
Username                                            you@contoso.com
Groups                                              [0b1c2d3e-… system:authenticated]
Extra: oid                                          [11112222-…]
# Namespace-scoped authorization (grant to one Entra group)
GROUP_ID=$(az ad group show -g "myapp-devs" --query id -o tsv)   # the group must already exist
az role assignment create --role "Azure Kubernetes Service RBAC Writer" \
  --assignee-object-id $GROUP_ID --assignee-principal-type Group \
  --scope $AKS_ID/namespaces/myapp
az role assignment create --role "Azure Kubernetes Service Cluster User Role" \
  --assignee-object-id $GROUP_ID --assignee-principal-type Group --scope $AKS_ID

How to verify: a group member runs kubectl auth can-i create deploy -n myapp and gets yes, and -n kube-system gets no. Common error: granting only Cluster User Role without a data-plane role. The user can download the kubeconfig, but every kubectl command returns 403.

Lab 5: from “can connect” to “only Entra can connect” (about 8 minutes)

Check the user section and sign-in method in the current kubeconfig (first block on the Commands tab). If it is devicecode, convert it to reuse the az sign-in:
kubelogin convert-kubeconfig -l azurecli
kubectl get nodes
Verify identity and permissions
kubectl auth whoami
kubectl auth can-i '*' '*' --all-namespaces
az role assignment list --scope $(az aks show -g $RG -n $CLUSTER --query id -o tsv) --query "[].{role:roleDefinitionName, who:principalName}" -o table
yes
Role                                           Who
---------------------------------------------  ----------------
Azure Kubernetes Service RBAC Cluster Admin    you@contoso.com
Prepare a namespace for the app later and demonstrate namespace-scoped authorization (if you can create an Entra group, run the group authorization commands on the Commands tab; otherwise, just read the commands):
kubectl create namespace myapp
AKS_ID=$(az aks show -g $RG -n $CLUSTER --query id -o tsv)
echo "$AKS_ID/namespaces/myapp"
First look at what local admin credentials look like, then disable local accounts
az aks get-credentials -g $RG -n $CLUSTER --admin --file /tmp/admin.kubeconfig
grep -c client-certificate-data /tmp/admin.kubeconfig     # 1: embedded certificate = permanent cluster-admin
rm -f /tmp/admin.kubeconfig
az aks update -g $RG -n $CLUSTER --disable-local-accounts -o none
az aks get-credentials -g $RG -n $CLUSTER --admin --file /tmp/admin.kubeconfig
1
(BadRequest) Getting static credential is not allowed because this cluster is set to disable local accounts.
Confirm Entra access still works
az aks show -g $RG -n $CLUSTER --query disableLocalAccounts
kubectl get ns myapp

Break-glass procedure (do not run this during the lab): a person with the AKS Contributor role runs az aks update --enable-local-accounts → get-credentials --admin → does the work → immediately runs --disable-local-accounts when finished.

Case 1: admin kubeconfig still held by a former employee

Problem: An audit found that several former employees still have kubeconfig files generated with --admin on their laptops. The certificates are valid for several years. Approach: Rotate the cluster certificates right away with az aks rotate-certs (this restarts nodes and needs a maintenance window). Then run --disable-local-accounts on all clusters, enforced with Azure Policy. Limitation: certificate rotation causes a brief interruption. After rotation, all automation that uses the certificates (such as an old CI) must move to an Entra service principal or workload identity.

Case 2: conditional access breaks devicecode

Problem: After the security team enabled a conditional access policy that allows only compliant devices, all developers' kubectl commands failed to sign in. Approach: Standardize workstations on kubelogin convert-kubeconfig -l azurecli (or interactive), because devicecode does not work under conditional access. Limitation: jump boxes without a browser must switch to a managed identity (-l msi) or reach the cluster from a compliant device through Azure Bastion.

Case 3: CI switches to workload identity federation

Problem: GitHub Actions deployed to AKS using a long-lived service principal secret. The secret expired once a year and broke deployments. Approach: Switch to an Entra app with a GitHub OIDC federated credential. In the pipeline, after azure/login, run kubelogin convert-kubeconfig -l azurecli (or workloadidentity), and grant RBAC Writer on the target namespace. See the GitHub course. Limitation: the federated credential's subject must exactly match the branch or environment.

Common errors and fixes

Error from server (Forbidden): pods is forbidden: User "you@contoso.com" cannot list resource "pods" in API group "" in the namespace "myapp": User does not have access to the resource in Azure. Update role assignment to allow access.

Cause: Authentication succeeded, but neither Azure RBAC nor K8s RBAC allows the request. A new role assignment can take a few minutes to take effect.

az role assignment list --assignee <object-ID> --all --query "[?contains(scope,'managedClusters')].{role:roleDefinitionName,scope:scope}" -o table

Fix: Assign RBAC Reader/Writer/Admin/Cluster Admin at cluster or namespace scope. After it takes effect, run kubelogin remove-cache-dir and retry.

exec: executable kubelogin not found / kubelogin is not installed which is required to connect to AAD enabled cluster

Cause: The kubeconfig exec section calls kubelogin, but kubelogin is not on the PATH.

sudo az aks install-cli; which kubelogin

Fix: Install it and retry. In CI images, install it explicitly and pin the version.

(BadRequest) Getting static credential is not allowed because this cluster is set to disable local accounts.

Cause: Local accounts are disabled on the cluster, so --admin is rejected. This is expected behavior.

Fix: Use Entra credentials (remove --admin). For a real emergency, follow the break-glass procedure.

AADSTS50005 / AADSTS53003: Access has been blocked by Conditional Access policies (devicecode sign-in failed)

Cause: Conditional access blocks the device code flow.

kubelogin convert-kubeconfig -l azurecli    # or -l interactive
(AuthorizationFailed) … does not have authorization to perform action 'Microsoft.ContainerService/managedClusters/listClusterUserCredential/action'

Cause: The user does not have the control-plane permission needed to download the kubeconfig.

Fix: Grant Azure Kubernetes Service Cluster User Role at cluster scope.

Command-line exercises
1. Give the group support (object ID in $SUP) read-only access to the myapp namespace, and allow it to download the kubeconfig.
az role assignment create --role "Azure Kubernetes Service RBAC Reader" --assignee-object-id $SUP --assignee-principal-type Group --scope $AKS_ID/namespaces/myapp
az role assignment create --role "Azure Kubernetes Service Cluster User Role" --assignee-object-id $SUP --assignee-principal-type Group --scope $AKS_ID
2. In GitHub Actions (already logged in with azure/login), let kubectl reuse the az sign-in.
az aks get-credentials -g $RG -n $CLUSTER --overwrite-existing
kubelogin convert-kubeconfig -l azurecli
kubectl get pods -n myapp
Scenario analysis
A 40-person organization shares one production AKS cluster. The platform team has 4 people, six application teams each have their own namespace, and one 24×7 support team needs read-only access. Design the authentication and authorization model, including CI and emergency access.

Cluster: Entra + Azure RBAC, --disable-local-accounts (enforced by Policy). Platform team: an Entra group with cluster-scope RBAC Cluster Admin, also set as --aad-admin-group-object-ids. Application teams: one Entra group per team, with RBAC Writer in their own namespace (or Admin, so they can manage their own RoleBindings), plus Cluster User Role at cluster scope to download the kubeconfig. Support team: RBAC Reader in each namespace (cannot see Secrets). CI: one application identity per team using a federated credential (GitHub OIDC / Azure Pipelines service connection), granted Writer on that namespace only. Emergency access: 2 break-glass accounts hold AKS Contributor on the cluster resource (activated on demand through PIM, strong MFA, with alerts). The procedure is written into the runbook. Conditional access requires compliant devices, and kubelogin uses azurecli or interactive across the board.

Verified teaching videos

▶
Authentication in Azure Kubernetes Service (AKS) explained — Programming with Wolfgang
English · comparison of local accounts, Entra, and Azure RBAC
▶
Kubelogin to connect to Kubernetes — Houssem Dellai
English · kubelogin sign-in methods demo (recorded earlier; follow this hour for commands)
▶
AKS Integration with Azure AD explained in plain English - Azure RBAC, Kubernetes RBAC, Kubeconfig — cloud-monk - cloud in plain english
English · concept overview (Azure AD is now Microsoft Entra ID)

Official docs

Video storyboard (about 80 seconds)

Shot 1 · 0–20s
Visual: open the kubeconfig. The user section has no password, just one line: command: kubelogin.
Narration: With Entra enabled, the kubeconfig no longer stores a secret. It only tells kubectl to call kubelogin to get a token.
Shot 2 · 20–45s
Visual: kubelogin walks up to the Entra gate. After MFA, it receives a token marked aud 6dae42f8 and hands it to kubectl.
Narration: The token's audience is the AKS server app, and the API server only accepts that audience.
Shot 3 · 45–65s
Visual: two guards stand behind the API server: Azure RBAC and Kubernetes RBAC. If either one nods, the request goes through.
Narration: For authorization, a request succeeds if either an Azure role assignment or a Kubernetes RoleBinding allows it.
Shot 4 · 65–80s
Visual: a golden key marked admin goes into a shredder. Next to it, a glass case is labeled break-glass.
Narration: For production clusters, disable local accounts and plan your emergency access process in advance.
or score ≥ 70% on the quiz

Module 6 · Add-ons, extensions, and managed components

35:00 – 42:00 · It is still “a controller installed in the cluster,” but who installs it, who upgrades it, and who you call when it breaks all have different answers.
7 minadd-on · extension · OSSSupport boundaries★★★★☆
Learning goals
  • Distinguish four kinds of cluster software: AKS add-ons / managed features, cluster extensions, AKS's built-in system components, and open-source software you install yourself with Helm. Explain each one's installation entry point, resource provider, upgrade rules, and support scope.
  • Remember the add-on upgrade rules: within the same Kubernetes minor version, only patch versions are upgraded. Major or minor versions of add-ons are upgraded only when the Kubernetes minor version is upgraded. Breaking changes are usually announced about 60 days in advance.
  • Manage them with az aks addon, az aks update --enable-*, and az k8s-extension, and recognize the kubernetes.azure.com/managedby: aks label and Helm releases with the aks-managed prefix.
Prerequisites: the responsibility boundaries from Module 1; the release concept from the Helm course. Importance: ★★★★☆

What: four kinds of cluster software

CategoryExamplesInstallation entry pointWho implements and upgrades itSupport
System components (installed by default)CoreDNS, konnectivity-agent, metrics-server, CNI/CNS, CSI drivers, cloud-node-managerNo installation neededUpgraded by AKS along with the versionSupported by AKS
Add-ons / managed featuresmonitoring, azure-policy, azure-keyvault-secrets-provider, ingress-appgw, virtual-node; toggle features: application routing, KEDA, VPA, Workload Identity, image cleaner, NAP, Istio service mesh, cost analysisaz aks enable-addons -a … or az aks create/update --enable-…Installed and upgraded as part of the AKS resource provider (Microsoft.ContainerService)Supported by AKS
Cluster extensionsFlux (GitOps), Dapr, Azure Machine Learning, Azure Backup for AKS, Azure Container Storage, Azure App Configuration, Argo CD, Kueueaz k8s-extension create --cluster-type managedClusters (core extensions can also use az aks extension create)Based on Helm charts. Its lifecycle is managed by the separate resource provider Microsoft.KubernetesConfigurationOpen a ticket with the corresponding service
Self-managed open source / third-partyingress-nginx, cert-manager, kube-prometheus-stack, Linkerd, and so on that you installed with Helmhelm install, GitOpsYouOutside AKS's support policy; contact the community or the vendor
Retired or soon-to-retire components (2026-11)open-service-mesh add-on is marked as retired; AKS support for it ends on 2027-09-30, so migrate to the Istio add-on; http_application_routing still appears in the CLI help but is retired, so use the application routing add-on instead; Microsoft Entra pod-managed identity ended support in 2025-09, so use Workload Identity instead; after upstream Ingress-NGINX was retired, AKS Automatic has used “application routing + Gateway API” by default since 1.36 (hour 2).

Why: why the distinction matters

  • Support boundaries: if an add-on has a problem, you can open an AKS support ticket. If your self-installed ingress-nginx has a problem, AKS support can only confirm that the platform is healthy.
  • Upgrade coupling: add-on minor versions follow the Kubernetes minor version. You can't upgrade the KEDA add-on to a new minor version on its own. If you want a faster pace, install it yourself and take responsibility for it.
  • Permissions and identity: Many add-ons create their own managed identities in MC_* (such as azurekeyvaultsecretsprovider-aks-lab). Make sure you grant permissions to the right identity.
  • Don't install the same thing two ways: for example, installing both the KEDA add-on and the KEDA Helm chart makes the CRDs and webhooks conflict.

How: upgrade rules for add-ons (official)

  1. Within the same Kubernetes minor version, add-ons are upgraded only to a newer patch version;
  2. Add-on major and minor versions are upgraded only when the cluster moves to a later Kubernetes minor version (the component version table in Module 2 is organized by Kubernetes version);
  3. Breaking or behavior changes in a GA minor version are announced in advance, typically about 60 days ahead;
  4. Patches ship with AKS's weekly release. You can control timing with maintenance windows and the release tracker;
  5. Exceptions: when the cluster version or the add-on itself is in preview, or when a CVE or critical bug must be fixed.

Extension upgrades are governed by each extension's own policy (most support --auto-upgrade-minor-version true). Azure Backup and Azure Monitor are “core extensions,” and their minor versions are aligned with the AKS version. Azure Monitor's Container Insights and Managed Prometheus are migrating their backends from add-ons to the core extension model. Users won't notice the change.

When: quick selection guide

NeedPreferredAlternative
Pod access to Key Vault secretsazure-keyvault-secrets-provider add-on (hour 3)External Secrets Operator (self-managed)
Event-driven autoscalingKEDA managed feature (--enable-keda, hour 4)KEDA Helm chart (when you need a newer version)
GitOpsFlux cluster extension (hour 5)Argo CD (extension or self-managed)
BackupAzure Backup for AKS extensionVelero (self-managed)
MetricsManaged Prometheus (--enable-azure-monitor-metrics)kube-prometheus-stack, see the Prometheus & Grafana course
Common misconceptions ① “Add-ons and extensions are the same thing.” Add-ons belong to the AKS RP, while extensions belong to the Microsoft.KubernetesConfiguration RP. Their resource IDs, permissions, and support channels are all different. ② “I can kubectl edit the Deployment of a managed component to tune its parameters.” AKS reconciles the change back. Use only the configuration entry points AKS supports, such as the coredns-custom ConfigMap for CoreDNS. ③ “A Helm release starting with aks-managed whose revision number keeps climbing is abnormal.” The official docs say this is expected. ④ “Microsoft supports all open-source software installed on AKS.” Self-managed installs are outside the support scope.

Ownership map: who reconciles these components in the cluster

Microsoft.ContainerServiceAKS resource provideraz aks enable-addons / --enable-* Microsoft.KubernetesConfigurationExtension resource provideraz k8s-extension create You / your pipelinehelm install · GitOpsOutside AKS support Cluster aks-lab kube-system: coredns, metrics-serversecrets-store-csi, ama-metrics, kedaLabel kubernetes.azure.com/managedby=aks flux-system: source/kustomize-controllerdapr-system, dataprotection-microsoftInstalled from a Helm chart by the extension agent ingress-nginx, cert-managerkube-prometheus-stack……You own the versions, CVEs, and upgrades
Figure 6-1 Three reconcilers, three support channels

Timeline: how add-on versions follow Kubernetes

Cluster 1.35 → 1.36: add-on version changes (data from the component table on the AKS version page) Kubernetes 1.35 keda 2.17.2-x (patch upgrades only, -x)coredns v1.13.1-xworkload-identity-webhook v1.5.1-x Kubernetes 1.36 keda 2.19.0-x (the minor upgrade happens here)coredns v1.14.3-xkarpenter (NAP) 1.12.2-aks
Figure 6-2 Want a newer KEDA minor version? Upgrade the Kubernetes minor version, or switch to a self-managed install and take on the support responsibility

Interactive: “Who owns this?” classifier

Click a component to see which category it falls into, then check its install path, upgrade method, and support channel.

Click a component first.

Core commands and parameters

CommandPurposeKey parameters / notes
az aks addon list -g RG -n NAMEList available add-ons and their enabled status-o table
az aks enable-addons / disable-addonsEnable / disable add-ons-a monitoring,azure-policy,azure-keyvault-secrets-provider,virtual-node,ingress-appgw,confcom; you can add --workspace-resource-id to monitoring
az aks update --enable-*On/off managed features--enable-app-routing, --enable-keda, --enable-vpa, --enable-image-cleaner, --enable-workload-identity, --enable-azure-monitor-metrics, --enable-cost-analysis, --node-provisioning-mode Auto
az extension add -n k8s-extensionInstall the CLI extension needed to manage extensions—
az k8s-extension create/list/show/update/deleteManage cluster extensions--cluster-type managedClusters, --extension-type microsoft.flux, --scope cluster, --auto-upgrade-minor-version
kubectl get pods -A -l kubernetes.azure.com/managedby=aksList the workloads AKS manages—
az aks addon list -g $RG -n $CLUSTER -o table
Name                             Enabled
-------------------------------  ---------
http_application_routing         False
monitoring                       False
virtual-node                     False
kube-dashboard                   False
azure-policy                     False
ingress-appgw                    False
confcom                          False
open-service-mesh                False
azure-keyvault-secrets-provider  False
az aks enable-addons -g $RG -n $CLUSTER -a azure-keyvault-secrets-provider -o none
az aks show -g $RG -n $CLUSTER --query "addonProfiles.azureKeyvaultSecretsProvider.{enabled:enabled, identity:identity.resourceId}" -o yaml
kubectl get pods -n kube-system -l 'app in (secrets-store-csi-driver,secrets-store-provider-azure)' -o wide
enabled: true
identity: /subscriptions/…/resourcegroups/MC_rg-aks-lab_aks-lab_canadacentral/providers/Microsoft.ManagedIdentity/userAssignedIdentities/azurekeyvaultsecretsprovider-aks-lab
NAME                                     READY   STATUS    NODE
aks-secrets-store-csi-driver-4xq9c       3/3     Running   aks-system-12345678-vmss000000
aks-secrets-store-provider-azure-8hkzp   1/1     Running   aks-system-12345678-vmss000000
… (one per node, DaemonSet)

How to verify: the add-on's managed identity appears in MC_*, and the Pods carry kubernetes.azure.com/managedby=aks. Common mistake: kube-dashboard shows up in the list but is no longer supported. Don't enable it.

Lab 6: Get to know the managed components, enable an add-on, and check extensions (about 8 minutes)

Cost: The Key Vault secrets provider add-on itself is free. The optional Managed Prometheus step incurs metric ingestion charges on the Azure Monitor workspace, billed pay-as-you-go.

Inventory the workloads AKS manages
kubectl get deploy,ds -n kube-system -l kubernetes.azure.com/managedby=aks
kubectl get cm -n kube-system | grep -E 'coredns'

You'll see coredns and coredns-custom. The latter is the supported customization entry point AKS provides for you (used in the DNS module of hour 2). If you edit the coredns ConfigMap directly, your changes get overwritten.

Enable the Key Vault secrets provider add-on (second section of the command page; hour 3 uses it to mount Key Vault secrets). Confirm its managed identity and DaemonSet.
Try “changing” a managed component and watch it get reconciled back
kubectl -n kube-system scale deploy metrics-server --replicas=5
sleep 90; kubectl -n kube-system get deploy metrics-server
NAME             READY   UP-TO-DATE   AVAILABLE   AGE
metrics-server   2/2     2            2           1h

If you still see 5 replicas after 90 seconds, check again later. The AKS add-on manager restores managed objects to their desired state. Don't do this in production.

Inspect cluster extensions (read-only)
az extension add -n k8s-extension --upgrade -y
az k8s-extension list -g $RG -c $CLUSTER -t managedClusters -o table
az k8s-extension extension-types list-by-cluster -g $RG -c $CLUSTER -t managedClusters --query "[].name" -o tsv | head -20

The list is empty for now. Hour 5 installs Flux (microsoft.flux) here. In some k8s-extension versions the extension-types subcommand has a different name. If you get an error, run az k8s-extension -h to check.

(Optional, incurs cost) Turn on Managed Prometheus metrics
az aks update -g $RG -n $CLUSTER --enable-azure-monitor-metrics -o none
kubectl get pods -n kube-system | grep ama-metrics

This creates (or reuses) an Azure Monitor workspace and deploys the ama-metrics collector. For queries, dashboards, and alerts, see hour 3 of the Prometheus & Grafana course. To turn it off, use --disable-azure-monitor-metrics.

Case 1: KEDA installed twice

Problem: The platform team enabled the KEDA managed feature, and an app team also installed KEDA with Helm. Two operators fought over ScaledObjects, and the HPA kept getting rewritten. Approach: Uninstall the Helm version and standardize on the managed KEDA. Maintain a “cluster capabilities list” in the platform docs, and use Policy or admission rules to block charts that install a CRD with the same name. Limits: The managed KEDA's minor version follows the Kubernetes minor version, so if you need a new scaler, you have to wait for a cluster upgrade.

Case 2: Opened a ticket and was told it's “out of support”

Problem: An ingress-nginx that the team installed itself dropped connections during peak hours. When they opened an AKS ticket, support only checked the load balancer and node health. Approach: In the short term, ask the community or vendor for help. Long term, evaluate moving to the App Routing add-on (managed NGINX → Gateway API) or Application Gateway for Containers (hour 2), so the ingress falls under AKS support. Limits: Upstream Ingress-NGINX has been retired, so migrating is necessary anyway.

Case 3: Add-on identity permissions drifted

Problem: Key Vault secret mounts suddenly failed. Someone cleaning up the Key Vault access policies removed the permissions of the azurekeyvaultsecretsprovider-aks-lab identity. Approach: Switch to Workload Identity (a separate identity for each app, hour 3), and manage the Key Vault RBAC assignments as IaC. Limits: The add-on identity lives in MC_*, so its object ID changes if you rebuild the cluster.

Common errors and fixes

(AddonNotSupported) / The addon "open-service-mesh" is retired …

Cause: You tried to enable an add-on that has been retired or isn't supported in the current version.

Fix: Follow the official migration guide to switch to the replacement (OSM → Istio add-on; HTTP application routing → App Routing add-on).

az k8s-extension: 'k8s-extension' is misspelled or not recognized by the system.

Cause: The CLI extension isn't installed.

az extension add -n k8s-extension
Extension provisioning failed: … ResourceProviderNotRegistered Microsoft.KubernetesConfiguration

Cause: The extension RP isn't registered (environment setup, step 3).

az provider register -n Microsoft.KubernetesConfiguration --wait
I edited the coredns ConfigMap in kube-system, and it reverted after a while

Cause: AKS reconciles managed components.

Fix: Put your customizations in the coredns-custom ConfigMap (the supported extension point), then run kubectl -n kube-system rollout restart deploy coredns.

Command-line exercises
1. Enable the Azure Policy add-on for aks-lab.
az aks enable-addons -g $RG -n $CLUSTER -a azure-policy
2. Install the Flux cluster extension on aks-lab.
az k8s-extension create -g $RG -c $CLUSTER -t managedClusters -n flux --extension-type microsoft.flux --scope cluster
Scenario analysis
The platform team needs to define an “approved software list” for 30 clusters. Classify Key Vault secret mounts, KEDA, Flux, cert-manager, ingress controllers, and metrics collection by support boundary, and explain the upgrade and on-call responsibilities for each category.

Add-ons / managed features (supported by AKS, upgraded with Kubernetes minor versions; the platform team only needs to follow cluster upgrades): Key Vault secrets provider, KEDA, Managed Prometheus (metrics), App Routing (ingress / Gateway API). Cluster extensions (supported by the corresponding service; the extension has its own version policy; enable minor auto-upgrade and test on a test cluster first): Flux. Self-managed open source (the platform team owns versions, CVEs, upgrades, and on-call; we recommend managing it centrally with GitOps and pinning versions): cert-manager. If ingress needs go beyond what App Routing can do, a self-managed Gateway implementation also falls into this category. The list should note substitution relationships, and two install methods for the same capability must not coexist.

Verified teaching videos

▶
AKS Node Auto Provisioning (NAP) - Feature Overview (Azure Kubernetes Service) — Azure Kubernetes Service (AKS)
English · Using NAP as an example, see what managed features look like (covered in depth in hour 4)
▶
AKS Community Calls - October 2026 — Azure Kubernetes Service (AKS)
English · The AKS team's monthly community call, for the latest on add-ons and features

No verified video comparing add-ons and extensions was found. See the storyboard below.

Official docs

Video storyboard (about 80 seconds)

Shot 1 · 0–20s
On screen: The cluster is like a building, and three administrators each hold a set of keys: the AKS RP, the extension RP, and you.
Narration: Software in the cluster has three landlords: the AKS resource provider, the extension resource provider, and you.
Shot 2 · 20–45s
On screen: KEDA's version number climbs step by step as the Kubernetes version goes up.
Narration: Within a Kubernetes minor version, add-ons get only patch upgrades. Their major and minor versions change only during a Kubernetes minor upgrade.
Shot 3 · 45–65s
On screen: Flux expands from a Helm package, with a Microsoft.KubernetesConfiguration label beside it.
Narration: Extensions are based on Helm charts, and a separate resource provider manages their lifecycle.
Shot 4 · 65–80s
On screen: A chart you installed yourself, with a sign beside it reading “at your own risk.”
Narration: Open-source software you install yourself with Helm is outside AKS support. You are responsible for its versions and vulnerabilities.
or score ≥ 70% on the quiz

Module 7 · Deploy myapp: ACR integration and first release

42:00 – 50:00 · Image pulls don't use imagePullSecret. They rely on an AcrPull role assignment on the kubelet identity.
8 minutes--attach-acrmyapp 1.0 → 1.1★★★★★
Learning goals
  • Create an ACR, build and push myapp 1.0 / 1.1 using ACR Tasks (az acr build) or local Docker, and import the Redis image with az acr import.
  • Explain how --attach-acr really works: it assigns AcrPull to the kubelet managed identity at the ACR scope, and the credential provider on the node uses that identity to exchange for an ACR token. Know the permissions it needs and the scenarios where it doesn't apply (registries in ABAC mode, cross-tenant).
  • Deploy myapp + Redis in the myapp namespace, expose it with a LoadBalancer, complete a rolling update, and use az aks check-acr to diagnose pull problems.
Prerequisites: myapp and image tags from the Docker course; Deployments, Services, and probes from the K8s course. Priority: ★★★★★

What: Three ways AKS pulls private images

MethodMechanismProsCons / when to use
--attach-acr (recommended)Assigns AcrPull to the kubelet identity; the node uses its managed identity to get an ACR tokenKeyless, with no Secret needed in each namespaceEvery Pod in the cluster can pull images from that ACR; requires permission to create role assignments
imagePullSecretPod references a kubernetes.io/dockerconfigjson SecretWorks with any private registry (Docker Hub, GHCR, external ACR)Keys must be rotated and distributed to every namespace
ACR anonymous pullAnonymous pull is enabled on the registry (Standard/Premium SKU)SimpleAnyone can pull; only suitable for public images

Why: why attach-acr needs “extra” permissions

--attach-acr is really a single Azure role assignment: principal = the kubelet identity (aks-lab-agentpool in MC_*), role = AcrPull, scope = that ACR. Creating a role assignment requires Microsoft.Authorization/roleAssignments/write, so the person running the command needs Owner, User Access Administrator, or an RBAC administrator role. (The official docs list Owner, Azure account administrator, or co-administrator; otherwise you can use an existing managed identity instead.) This assignment is created by the CLI using your identity, not by the AKS RP.

Two boundaries to watch ① If the ACR uses “RBAC Registry + ABAC Repository Permissions” mode, not supported with --attach-acr. You need to assign the Container Registry Repository Reader role manually. ② If you grant AcrPull through an Entra group and then add the kubelet identity to that group, group membership takes time to take effect. For automated scenarios, pre-create a user-assigned kubelet identity (bring your own kubelet identity).

How: What happens on the node during a pull

  1. The scheduler places the Pod on aks-userpool-…, and the kubelet finds that acraksNNNNN.azurecr.io/myapp:1.0 isn't present locally.
  2. For *.azurecr.io, the kubelet calls the configured image credential provider plugin (the Azure credential provider preinstalled on AKS nodes).
  3. The plugin uses the kubelet managed identity, via IMDS (169.254.169.254) on the node, to get an Entra access token.
  4. The plugin calls ACR's /oauth2/exchange, exchanges the Entra token for an ACR refresh token, and returns it to the kubelet as a username and password (the username is a fixed empty GUID).
  5. containerd uses these credentials to request /oauth2/token?scope=repository:myapp:pull. ACR checks the identity's role on the registry (AcrPull) and issues an access token.
  6. containerd downloads the manifest and layers (blobs are downloaded from the storage endpoint), unpacks them, and starts the container.

Any failed step shows up as ErrImagePull → ImagePullBackOff. DNS or network problems report no such host or timeouts; no AcrPull reports 401 Unauthorized; a missing tag reports not found. az aks check-acr runs a diagnostic Pod on the node and checks these steps in order.

When: choosing a release method

  • This hour: kubectl apply on raw manifests + kubectl set image for rolling updates, so you can see each object clearly.
  • Production: Helm chart (hour 3 of the Helm course) + pipelines (GitHub Actions / Azure Pipelines) or GitOps (hour 5), with images pinned by digest.
  • Exposure: this hour uses type: LoadBalancer (AKS adds rules and a public IP to the load balancer in MC_*). In production, use App Routing / Gateway API or Application Gateway for Containers (hour 2).
Common misconceptions ① “attach-acr creates an imagePullSecret in the cluster.” No, you won't see any credential object in the cluster. ② “Giving AcrPull to the cluster identity is enough.” Pulls are done by the kubelet identity, not the cluster (control plane) identity. ③ “A Pod's Workload Identity can be used to pull images.” Image pulls happen in the kubelet and don't use the Pod's identity. ④ “ACR Basic can't be used in production.” It works functionally, but throughput, storage quotas, Private Link, geo-replication, and similar capabilities are only available in higher SKUs.

Deployment diagram: myapp on aks-lab

User's browser / curlhttp://<EXTERNAL-IP>/ Azure LB kubernetesPublic IP (MC_*):80 Namespace myapp (user pool nodes) Service myappLoadBalancer 80 → 5000 Deployment myapp3 replicas · gunicorn :5000readiness/liveness /healthzREDIS_HOST=redisSpread across availability zonesrunAsNonRoot (UID 10001) Service redisClusterIP :6379 Deployment redis1 replica (no persistence) ACR acraksNNNNNmyapp:1.0 / 1.1redis:7.4-alpine (imported)AcrPull →aks-lab-agentpool kubelet (each node)Credential providerIMDS → Entra token→ ACR token
Figure 7-1 Traffic enters the Service through the public LB; images are pulled from ACR to the node by the kubelet identity

Permission diagram: attach-acr does just one thing

Principal: aks-lab-agentpool(user-assigned managed identity for the kubelet) Role: AcrPull7f951dda-4ed3-4680-a7ca-43fe172d538d Scope: registries/acraksNNNNNCreated by you, running az
Figure 7-2 az role assignment list --scope $ACR_ID shows this assignment; --detach-acr deletes it

Animation: the full path of an image pull

Choose a scenario and step through how the kubelet gets credentials, and where the error appears when something fails.

kubeletImage needed Credential provider*.azurecr.io IMDSkubelet identity Entra IDAccess token ACR oauth2exchange/token ACR registrymanifest/blob containerd—

Core commands and parameters

CommandPurposeKey parameters / notes
az acr createCreate a registry--sku Basic|Standard|Premium; the name must be globally unique, 5–50 alphanumeric characters
az acr buildBuild and push in the cloud with ACR Tasks-r, -t, --build-arg, --platform linux/amd64; some subscription types don't allow Tasks
az acr importCopy images from another registry (no local Docker needed)--source docker.io/library/redis:7.4-alpine --image redis:7.4-alpine
az acr loginLog local Docker in to ACRFor docker push
az aks update --attach-acr / --detach-acrAdd / remove AcrPull for the kubelet identityThe value can be the ACR name or a resource ID (use the resource ID across subscriptions)
az aks check-acrDiagnose whether pulls work on a node--acr NAME.azurecr.io (must be the FQDN), --node-name
az acr repository show-tagsList tags--repository myapp -o table
source ~/.aks-lab.env
az acr create -n $ACR -g $RG --sku Basic -o table
az aks update -g $RG -n $CLUSTER --attach-acr $ACR -o none
ACR_ID=$(az acr show -n $ACR --query id -o tsv)
az role assignment list --scope $ACR_ID --query "[].{role:roleDefinitionName, principal:principalName}" -o table
az aks check-acr -g $RG -n $CLUSTER --acr $ACR.azurecr.io
Role     Principal
-------  --------------------------------------
AcrPull  aks-lab-agentpool
[2026-11-15T10:42:11Z] Checking host name resolution (acraks18342.azurecr.io): SUCCEEDED
[2026-11-15T10:42:11Z] Canonical name for ACR (acraks18342.azurecr.io): r0928ccc.canadacentral.cloudapp.azure.com.
[2026-11-15T10:42:11Z] ACR location: canadacentral
[2026-11-15T10:42:11Z] Checking managed identity...
[2026-11-15T10:42:11Z] Cluster cloud name: AzurePublicCloud
[2026-11-15T10:42:11Z] Kubelet managed identity client ID: 0a1b2c3d-…
[2026-11-15T10:42:12Z] Validating managed identity existance: SUCCEEDED
[2026-11-15T10:42:12Z] Validating image pull permission: SUCCEEDED
[2026-11-15T10:42:12Z]
Your cluster can pull images from acraks18342.azurecr.io!

How to verify: the role assignment's principal is aks-lab-agentpool (the kubelet identity). Common mistakes: --acr with only the name and no .azurecr.io; checking right after a new assignment can fail because of replication delay, so wait 1–2 minutes and retry.

Lab 7: From source code to the public internet with myapp (about 15 minutes)

Cost: ACR Basic is billed per day (very low); a public LoadBalancer IP is billed per hour. Role: Owner on the resource group (attach-acr needs to create a role assignment). Security: myapp is exposed directly to the public internet with no authentication. Use it only for this lab, and delete the Service when you're done.

Prepare the myapp source (same as the Docker course: Flask + gunicorn + Redis, port 5000, /healthz)
mkdir -p ~/akslab/myapp && cd ~/akslab/myapp
cat > app.py <<'EOF'
import os, socket
from flask import Flask
import redis

VERSION = os.getenv("APP_VERSION", "1.0")
app = Flask(__name__)
r = redis.Redis(host=os.getenv("REDIS_HOST", "redis"), port=6379, socket_connect_timeout=1)

@app.route("/")
def index():
    try:
        hits = r.incr("hits")
    except redis.exceptions.RedisError as e:
        hits = f"N/A ({type(e).__name__})"
    return f"myapp v{VERSION} from {socket.gethostname()}, hits={hits}\n"

@app.route("/healthz")
def healthz():
    return "ok\n"
EOF
cat > requirements.txt <<'EOF'
flask==3.1.*
redis==5.*
gunicorn==23.*
EOF
cat > Dockerfile <<'EOF'
# syntax=docker/dockerfile:1
FROM python:3.13-slim
ARG APP_VERSION=1.0
ENV APP_VERSION=${APP_VERSION}
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
RUN useradd -m -u 10001 appuser
USER 10001
EXPOSE 5000
CMD ["gunicorn", "-b", "0.0.0.0:5000", "--workers", "2", "--access-logfile", "-", "app:app"]
EOF
Create the ACR, build two versions, import Redis
source ~/.aks-lab.env
az acr create -n $ACR -g $RG --sku Basic -o none
az acr build -r $ACR -t myapp:1.0 --build-arg APP_VERSION=1.0 --platform linux/amd64 .
az acr build -r $ACR -t myapp:1.1 --build-arg APP_VERSION=1.1 --platform linux/amd64 .
az acr import -n $ACR --source docker.io/library/redis:7.4-alpine --image redis:7.4-alpine
az acr repository list -n $ACR -o table
az acr repository show-tags -n $ACR --repository myapp -o table
Run ID: ca1 was successful after 48s
…
Result
--------
myapp
redis
Result
--------
1.0
1.1

If az acr build fails with TasksOperationsNotAllowed (some trial subscriptions block ACR Tasks), use local Docker instead: az acr login -n $ACR → docker build -t $ACR.azurecr.io/myapp:1.0 --build-arg APP_VERSION=1.0 . → docker push $ACR.azurecr.io/myapp:1.0 (same for 1.1). az acr import from Docker Hub anonymously may be rate-limited; if it fails, retry later or add --username/--password.

Attach the ACR and check it: run the commands from attach-acr through check-acr on the “Commands” tab.
Deploy Redis and myapp
cat > ~/akslab/myapp/k8s.yaml <<EOF
apiVersion: apps/v1
kind: Deployment
metadata: { name: redis, namespace: myapp, labels: { app: redis } }
spec:
  replicas: 1
  selector: { matchLabels: { app: redis } }
  template:
    metadata: { labels: { app: redis } }
    spec:
      nodeSelector: { kubernetes.azure.com/mode: user }
      containers:
      - name: redis
        image: $ACR.azurecr.io/redis:7.4-alpine
        ports: [ { containerPort: 6379 } ]
        resources: { requests: { cpu: 50m, memory: 64Mi }, limits: { memory: 128Mi } }
---
apiVersion: v1
kind: Service
metadata: { name: redis, namespace: myapp }
spec:
  selector: { app: redis }
  ports: [ { port: 6379, targetPort: 6379 } ]
---
apiVersion: apps/v1
kind: Deployment
metadata: { name: myapp, namespace: myapp, labels: { app: myapp } }
spec:
  replicas: 3
  selector: { matchLabels: { app: myapp } }
  template:
    metadata: { labels: { app: myapp } }
    spec:
      nodeSelector: { kubernetes.azure.com/mode: user }
      topologySpreadConstraints:
      - maxSkew: 1
        topologyKey: topology.kubernetes.io/zone
        whenUnsatisfiable: ScheduleAnyway
        labelSelector: { matchLabels: { app: myapp } }
      securityContext: { runAsNonRoot: true }
      containers:
      - name: myapp
        image: $ACR.azurecr.io/myapp:1.0
        ports: [ { containerPort: 5000 } ]
        env: [ { name: REDIS_HOST, value: redis } ]
        readinessProbe: { httpGet: { path: /healthz, port: 5000 }, periodSeconds: 5 }
        livenessProbe: { httpGet: { path: /healthz, port: 5000 }, initialDelaySeconds: 10, periodSeconds: 10 }
        resources: { requests: { cpu: 100m, memory: 96Mi }, limits: { memory: 192Mi } }
---
apiVersion: v1
kind: Service
metadata: { name: myapp, namespace: myapp }
spec:
  type: LoadBalancer
  selector: { app: myapp }
  ports: [ { port: 80, targetPort: 5000 } ]
EOF
kubectl apply -f ~/akslab/myapp/k8s.yaml
kubectl -n myapp rollout status deploy/myapp
kubectl -n myapp get pods -o wide
kubectl -n myapp get svc myapp -w        # wait until EXTERNAL-IP appears, then press Ctrl+C
deployment "myapp" successfully rolled out
NAME                     READY   STATUS    NODE
myapp-7b9c6d5f4-2kq8x    1/1     Running   aks-userpool-87654321-vmss000000
myapp-7b9c6d5f4-9xw4m    1/1     Running   aks-userpool-87654321-vmss000001
myapp-7b9c6d5f4-tz7pn    1/1     Running   aks-userpool-87654321-vmss000000
redis-5d8f7b6c9-hq2lz    1/1     Running   aks-userpool-87654321-vmss000001
NAME    TYPE           CLUSTER-IP    EXTERNAL-IP    PORT(S)        AGE
myapp   LoadBalancer   10.0.152.31   20.151.88.17   80:31873/TCP   55s
Access it and roll out to 1.1
IP=$(kubectl -n myapp get svc myapp -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
for i in 1 2 3; do curl -s http://$IP/; done
kubectl -n myapp set image deploy/myapp myapp=$ACR.azurecr.io/myapp:1.1
kubectl -n myapp rollout status deploy/myapp
curl -s http://$IP/
kubectl -n myapp rollout history deploy/myapp
myapp v1.0 from myapp-7b9c6d5f4-2kq8x, hits=1
myapp v1.0 from myapp-7b9c6d5f4-tz7pn, hits=2
myapp v1.0 from myapp-7b9c6d5f4-9xw4m, hits=3
deployment "myapp" successfully rolled out
myapp v1.1 from myapp-6f4d8c7b9-p2m5k, hits=4
See what happened on the Azure side
az network lb frontend-ip list -g MC_${RG}_${CLUSTER}_${LOC} --lb-name kubernetes -o table
az network lb rule list -g MC_${RG}_${CLUSTER}_${LOC} --lb-name kubernetes --query "[].{name:name, fe:frontendPort, be:backendPort}" -o table

The cluster identity (control plane) created a public frontend IP and a port 80 rule on the load balancer in MC_* for the Service. This is the “cluster identity calls the Azure API” described in Module 1.

Failure drill: revoke AcrPull
az aks update -g $RG -n $CLUSTER --detach-acr $ACR -o none
kubectl -n myapp rollout restart deploy/myapp
sleep 60; kubectl -n myapp get pods
kubectl -n myapp describe pod -l app=myapp | grep -m2 -E 'Failed to pull|401'
az aks update -g $RG -n $CLUSTER --attach-acr $ACR -o none
kubectl -n myapp rollout status deploy/myapp

Images already pulled to a node (IfNotPresent) won't be affected, so some new Pods may still succeed. Pods landing on new nodes, or on nodes whose image cache was cleared, will get a 401. After you restore access, you may need to run rollout restart once more.

Cleanup (this module): keep myapp for the Module 8 review. Cleanup steps for the full course are in the Capstone lab, after you finish everything.

Case 1: The pipeline lacks permission to do attach-acr

Problem: The platform pipeline's service principal has only Contributor. az aks create --attach-acr fails with “Could not create a role assignment for ACR. Are you an Owner on this subscription?” The cluster was created, but it can't pull images. Approach: Change the role assignment from an implicit CLI behavior to an explicit declaration in IaC (roleAssignments in Bicep/Terraform, hour 5), run by a deployment identity with RBAC management permissions. Or grant the pipeline identity a conditioned RBAC administrator role that only allows assigning AcrPull. Limits: The RBAC administrator role is high-privilege in itself, so always add conditions.

Case 2: One ACR serving multiple clusters

Problem: The dev, test, and prod clusters share one ACR, and the dev cluster's kubelet identity can also pull prod-only images. Approach: Split the ACR by environment, or use ABAC repository-level permissions on a Premium ACR (in this case you can't use --attach-acr. Instead, assign Container Registry Repository Reader with a repository condition). Publish images by digest, and enable content trust / signature verification on the prod ACR (hour 3). Limits: ABAC mode requires adjusting all existing AcrPull assignments.

Case 3: Private ACR plus a proxy causes pull timeouts

Problem: After the ACR moved to Private Link, pulls timed out on a cluster configured with an HTTP proxy. Approach: Add the ACR's REST endpoint and data endpoint (*.data.azurecr.io) to the cluster's noProxy list, and verify on specific nodes with az aks check-acr. Limits: The private DNS zone must be linked to the cluster's VNet (hour 2).

Common errors and fixes

Failed to pull image "acraks18342.azurecr.io/myapp:1.0": … failed to authorize: failed to fetch anonymous token: unexpected status … 401 Unauthorized

Cause: The kubelet identity doesn't have AcrPull on that ACR (not attached, detached, ABAC mode, or cross-tenant).

az aks check-acr -g $RG -n $CLUSTER --acr $ACR.azurecr.io
az role assignment list --scope $(az acr show -n $ACR --query id -o tsv) -o table

Fix: az aks update --attach-acr; in ABAC mode, assign Container Registry Repository Reader instead; for cross-tenant, use an imagePullSecret or a service principal.

Failed to pull image "…/myapp:1.2": … not found

Cause: The tag doesn't exist (typo, failed build, or pushed to a different registry).

az acr repository show-tags -n $ACR --repository myapp -o table
dial tcp: lookup acraks18342.azurecr.io: no such host

Cause: The name is misspelled, or the private DNS zone for the private ACR isn't linked to the cluster's VNet.

Fix: Check the name. For private setups, check the privatelink.azurecr.io zone link (hour 2).

Could not create a role assignment for ACR. Are you an Owner on this subscription?

Cause: The identity running --attach-acr can't create role assignments.

Fix: Run it as Owner / User Access Administrator, or assign manually: az role assignment create --role AcrPull --assignee-object-id <kubelet objectId> --assignee-principal-type ServicePrincipal --scope $ACR_ID.

(TasksOperationsNotAllowed) ACR Tasks requests for the registry … are not permitted

Cause: The subscription type doesn't allow ACR Tasks.

Fix: Use local docker build + az acr login + docker push, or build on a CI runner.

The EXTERNAL-IP of Service myapp stays <pending>

Cause: Public IP quota is insufficient, a policy blocks public IPs, or the cluster identity lacks network permissions (common in bring-your-own-VNet setups).

kubectl -n myapp describe svc myapp | sed -n '/Events/,$p'

Fix: Handle it based on the Azure error code in the events. For a bring-your-own VNet, grant the cluster identity Network Contributor on the subnet (hour 2).

Command-line exercises
1. Without --attach-acr, assign AcrPull to the kubelet identity manually.
KUBELET_OID=$(az aks show -g $RG -n $CLUSTER --query identityProfile.kubeletidentity.objectId -o tsv)
az role assignment create --role AcrPull --assignee-object-id $KUBELET_OID --assignee-principal-type ServicePrincipal --scope $(az acr show -n $ACR --query id -o tsv)
2. Roll myapp back to the previous version and confirm.
kubectl -n myapp rollout undo deploy/myapp
kubectl -n myapp rollout status deploy/myapp
kubectl -n myapp get deploy myapp -o jsonpath='{.spec.template.spec.containers[0].image}'
Scenario analysis
A new colleague deploys myapp to a newly created cluster, and the Pod gets stuck in ImagePullBackOff. Give troubleshooting steps in the order of the image pull path.

① Read the exact text in the event from kubectl describe pod: not found (tag problem) / 401 (permissions) / no such host or i/o timeout (DNS / network). ② Tags: check with az acr repository show-tags, and confirm the image was pushed to the correct registry and repository. ③ Permissions: az aks check-acr --acr NAME.azurecr.io; az role assignment list --scope $ACR_ID to see whether the kubelet identity (not the cluster identity) has AcrPull. A new assignment needs a few minutes to take effect. In ABAC mode, you need Repository Reader. ④ Network: the private DNS link for a private ACR, whether the firewall / UDR allows *.azurecr.io and *.data.azurecr.io, and the proxy's noProxy. ⑤ After the fix, run rollout restart and watch; finally, put the role assignment into IaC so it doesn't get missed next time.

Verified teaching videos

▶
Integrate AKS and ACR to allow pulling images (multiple methods) — Andrei Barbu - courscape com
English · Side-by-side demo of attach-acr, manual role assignment, and imagePullSecret
▶
Azure Kubernetes Services (AKS) Overview — John Savill's Technical Training
English · Covers how a LoadBalancer Service relates to the Azure load balancer

Official docs

Video storyboard (about 90 seconds)

Shot 1 · 0–20s
On screen: In the terminal, az acr build runs, the cloud build log scrolls, and myapp:1.0 and 1.1 appear on the ACR shelf.
Narration: Build in the cloud with ACR Tasks. You don't even need Docker on your machine.
Shot 2 · 20–45s
On screen: A role assignment card: principal aks-lab-agentpool, role AcrPull, scope ACR.
Narration: attach-acr does just one thing: it assigns AcrPull on the ACR to the kubelet identity. There are no keys anywhere in the cluster.
Shot 3 · 45–70s
On screen: The kubelet on the node gets a token from IMDS, exchanges it for an ACR token, and downloads the image layers.
Narration: When pulling an image, the node uses its managed identity to get a token from Entra, then exchanges it for a registry token at ACR.
Shot 4 · 70–90s
On screen: The browser shows myapp v1.1, and the counter keeps going up.
Narration: With a single LoadBalancer Service, AKS adds the rules and the public IP to the Azure load balancer for you.
or score ≥ 70% on the quiz

Module 8 · Cluster readiness review and troubleshooting basics

50:00 – 60:00 · Review the cluster you just built with 10 questions, then use a troubleshooting tree to handle the 6 most common kinds of failure
10 minutesReadiness checklistInteractive troubleshooting tree★★★★★
Learning goals
  • Use a 10-item readiness checklist (SLA, version, upgrades and maintenance window, system pool isolation, availability zones, identity, image source, workload resilience, observability, and networking and cost) to review aks-lab, and give a check command for each item.
  • Close two gaps in aks-lab: a maintenance window, and a PodDisruptionBudget for myapp.
  • Locate common failures by the layer where they happen: creation failures (ARM / RP), access failures (Entra / RBAC), scheduling failures (taints / capacity), pull failures (ACR), unreachable from outside (LB), and nodes NotReady.
Prerequisites: Modules 1–7. Priority: ★★★★★

What: What a readiness review is

A readiness review checks, item by item against a fixed list, whether the platform defaults meet production requirements before the cluster takes production traffic. It draws on the Azure Well-Architected Framework's AKS service guide and the AKS baseline architecture, but keeps only the items this hour can check. Deeper reviews of networking, security, scaling, and operations are done in Module 8 of hours 2–6.

#Check itemProduction expectationCurrent state of aks-labCheck command
1Pricing tier / SLAStandard (or Premium / Automatic)Free (lab)az aks show --query sku
2Version supportWithin community support, > 3 months before end of life1.36 (until 2027-06)az aks get-upgrades
3Automatic upgrades and maintenance windowsCluster patch/stable channel + node OS channel + maintenance windowChannels set, no maintenance windowaz aks maintenanceconfiguration list
4System pool isolation≥ 2 nodes (3 recommended), CriticalAddonsOnly taint, specs meet requirements2 nodes + taintaz aks nodepool list
5Availability zonesSystem pool and user pool span 3 availability zonesSpans zoneskubectl get nodes -L topology.kubernetes.io/zone
6IdentityEntra + Azure RBAC, local accounts disabled, admin group / break-glass plannedDone (no admin group)az aks show --query "{aad:aadProfile, local:disableLocalAccounts}"
7Image sourcePull only from your own ACR (attach-acr), publish by digestACR + tagskubectl get pods -A -o jsonpath='{..image}'
8Workload resilience≥ 2 replicas, probes, requests/limits, PDB, spread across zonesNo PDBkubectl get pdb -A
9ObservabilityContainer Insights / Managed Prometheus, control plane diagnostic logs, alertsNot enabled (or metrics only)az aks show --query "{mon:addonProfiles.omsagent.enabled, prom:azureMonitorProfile.metrics.enabled}"
10Networking and costCIDR planned, API server access restricted (authorized IPs or private), tags complete, non-production scheduled to stopCIDR planned, API publicly exposedaz aks show --query apiServerAccessProfile

Why: why review on day one

  • Module 3 explained that many settings can only be set at creation time (Pod CIDR, availability zones, node resource group name, network plugin). If you find out after going live, the fix is rebuilding the cluster.
  • Platform defaults aren't production defaults: Standard clusters default to the Free tier, local accounts, manual upgrades, and no maintenance window.
  • The review results are a roadmap for the rest of the course: every item that isn't met maps to a module in hours 2–7.

How: the layered approach to troubleshooting basics

  1. ARM layer (the command fails immediately, with error codes like (AuthorizationFailed) or (RequestDisallowedByPolicy)): check permissions and policy.
  2. AKS RP layer ((QuotaExceeded), (SkuNotAvailable), provisioningState: Failed): check quotas, SKUs, and the activity log.
  3. Access layer (kubectl reports Unauthorized / Forbidden): check kubelogin, role assignments, and local account settings.
  4. Scheduling layer (Pod Pending): the FailedScheduling event from kubectl describe pod: taints, resources, affinity.
  5. Image layer (ErrImagePull / ImagePullBackOff): check-acr, tags, 401.
  6. Service layer (EXTERNAL-IP pending, connection timeouts): Service events, Endpoints, LB rules, NSG.
  7. Node layer (NotReady): the Conditions from kubectl describe node. AKS has automatic node repair, but you still need to find the root cause (hour 7).

The cluster's “Diagnose and solve problems” page in the portal (AKS Diagnostics) provides automatic checks by category, and Azure Advisor gives reliability and security recommendations. They're strong supplements for reviews and troubleshooting.

Common misconceptions ① “If the cluster can run myapp, it's production ready.” Working features ≠ able to withstand failures, upgrade safely, and be audited. ② “One review is enough.” Every version upgrade and every new node pool should rerun the checklist (hour 5 automates this as policy). ③ “ImagePullBackOff is always a network problem.” The most common causes are a wrong tag and 401. ④ “Restart a NotReady node first and ask questions later.” AKS automatic repair handles many cases. What you need is to collect evidence and find the root cause.

Layer diagram: which layer the failure is in

① ARM: AuthorizationFailed · RequestDisallowedByPolicy · MissingSubscriptionRegistration ② AKS RP: QuotaExceeded · SkuNotAvailable · K8sVersionNotSupported · provisioningState=Failed ③ Access: kubelogin not found · AADSTS… · Forbidden (Azure RBAC) · static credential not allowed ④ Scheduling: FailedScheduling · untolerated taint · Insufficient cpu/memory ⑤ Image: ErrImagePull · 401 Unauthorized · not found · no such host ⑥ Service: EXTERNAL-IP <pending> · no Endpoints · failed probes making Pods not ready ⑦ Node: NotReady · DiskPressure / MemoryPressure · automatic repair events
Figure 8-1 Troubleshoot from the top down: if a layer above fails, the layers below never happen. The format of the error code itself reveals the layer.

Review radar: how aks-lab looks right now

SLA / version (points deducted for Free tier) Identity (meets requirements) Node pools and availability zones (meets requirements) Workload resilience (no PDB) Operations (no maintenance window / monitoring)
Figure 8-2 Rough scores across five dimensions. After Lab 8 adds the maintenance window and PDB, the two dimensions on the left will expand noticeably.

Interactive: readiness scorecard

Check the boxes to match your actual cluster (the defaults reflect aks-lab after completing Labs 1–7). The scorecard gives a weighted score, a conclusion, and next-step recommendations.

Core commands and parameters

CommandPurposeKey parameters / notes
az aks show --query …Pull the fields needed for the review in one goSee script below
az aks maintenanceconfiguration addAdd a maintenance window-n aksManagedAutoUpgradeSchedule (cluster upgrades) / aksManagedNodeOSUpgradeSchedule (node OS), --schedule-type Weekly --day-of-week --interval-weeks --start-time --duration --utc-offset
az advisor recommendation listAzure Advisor recommendations--category HighAvailability|Security|Cost, --ids $AKS_ID
kubectl get events -A --sort-by=.lastTimestampRecent events--field-selector type=Warning
kubectl describe pod/nodeDetailed status and eventsCheck Events and Conditions
kubectl get pdb -ACheck PDBsUpgrade drains depend on it
source ~/.aks-lab.env
az aks show -g $RG -n $CLUSTER --query "{tier:sku.tier, version:currentKubernetesVersion, upgrade:autoUpgradeProfile.upgradeChannel, nodeOs:autoUpgradeProfile.nodeOsUpgradeChannel, aad:aadProfile.managed, azureRbac:aadProfile.enableAzureRbac, localDisabled:disableLocalAccounts, apiRanges:apiServerAccessProfile.authorizedIpRanges, private:apiServerAccessProfile.enablePrivateCluster, prom:azureMonitorProfile.metrics.enabled}" -o yaml
az aks nodepool list -g $RG --cluster-name $CLUSTER --query "[].{pool:name, mode:mode, count:count, vm:vmSize, zones:join(',',availabilityZones||['none']), taints:join(',',nodeTaints||['-'])}" -o table
az aks maintenanceconfiguration list -g $RG --cluster-name $CLUSTER -o table
kubectl get pdb -A
aad: true
apiRanges: null
azureRbac: true
localDisabled: true
nodeOs: NodeImage
private: null
prom: null
tier: Free
upgrade: patch
version: 1.36.5
Pool      Mode    Count    Vm               Zones    Taints
--------  ------  -------  ---------------  -------  ------------------------------------
system    System  2        Standard_D4s_v5  1,2,3    CriticalAddonsOnly=true:NoSchedule
userpool  User    2        Standard_D2s_v5  1,2,3    -
No resources found

Lab 8: Review aks-lab and close two gaps (about 10 minutes)

Run the review queries (script on the command page), tick the boxes honestly on the scorecard on the Animation tab, and note the score.
Close gap 1: maintenance window (4 hours starting Saturday 02:00 UTC; node OS updates on Sunday)
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 4 --utc-offset +00:00
az aks maintenanceconfiguration add -g $RG --cluster-name $CLUSTER -n aksManagedNodeOSUpgradeSchedule \
  --schedule-type Weekly --day-of-week Sunday --interval-weeks 1 --start-time 02:00 --duration 4 --utc-offset +00:00
az aks maintenanceconfiguration list -g $RG --cluster-name $CLUSTER -o table

The maintenance window controls when automatic upgrade channels run. Note that since 2027-06, platform-initiated upgrades don't follow the maintenance window (Module 2).

Close gap 2: PDB for myapp
kubectl apply -f - <<'EOF'
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata: { name: myapp, namespace: myapp }
spec:
  minAvailable: 2
  selector: { matchLabels: { app: myapp } }
EOF
kubectl -n myapp get pdb
NAME    MIN AVAILABLE   MAX UNAVAILABLE   ALLOWED DISRUPTIONS   AGE
myapp   2               N/A               1                     5s

Redis has only 1 replica and no persistence, so this hour doesn't add a PDB. (Adding minAvailable: 1 would leave node drains stuck forever, one of the upgrade failures covered in hour 6.)

Check the Advisor and recent warning events
az advisor recommendation list --ids $(az aks show -g $RG -n $CLUSTER --query id -o tsv) --query "[].{cat:category, impact:impact, problem:shortDescription.problem}" -o table
kubectl get events -A --field-selector type=Warning --sort-by=.lastTimestamp | tail -10

Advisor recommendations can take up to 24 hours to appear. An empty list on a new cluster is normal.

Walk through the troubleshooting tree: open the interactive troubleshooting tree on the Troubleshooting tab, select “Pod stuck in Pending,” and match it against the symptoms from Lab 4 to confirm the diagnostic path.
Score again: go back to the scorecard, tick “Maintenance window” and “PDB,” and compare the score change. Write the items that still aren't met, and the matching hours, into your platform to-do list.

Case 1: Pre-launch review found the Free tier

Problem: A “production” cluster created from a template was still on the Free tier, and the review found it had no SLA. Approach: az aks update --tier standard (no downtime). Split the template into dev and prod parameter sets, and use Azure Policy to audit Free-tier clusters in the production subscriptions. Limits: The tier can be changed at any time, but issues like availability zones and CIDR that are caught in a review can only be fixed by rebuilding.

Case 2: Upgrade stuck on drain

Problem: Automatic upgrades failed in the maintenance window because a single-replica service had a PDB set to minAvailable: 1, so the node could never drain. Approach: Add a check to the readiness checklist: the PDB's ALLOWED DISRUPTIONS must not be 0. For single-replica services, either scale to 2 replicas, or skip the PDB and accept a brief disruption. Limits: Platform-initiated upgrades may get past PDBs that block eviction, forcing disruptions (hour 6).

Case 3: Use the review checklist to standardize 20 clusters

Problem: Several teams each created their own clusters, with very different configurations. Approach: Turn the 10-item checklist from this module into a script + Azure Policy (audit mode), and generate a report every week. New clusters must be created from the platform template (hour 5). Limits: Some items (PDBs, probes) belong to the application layer, so agree on them with app teams and check them in CI.

Interactive troubleshooting tree

Pick the error or symptom you see step by step to get diagnostic commands and fix suggestions.

Quick reference for common errors

Unable to connect to the server: dial tcp: lookup aks-lab-…hcp.canadacentral.azmk8s.io: no such host

Cause: The cluster was deleted or stopped (after stopping, the FQDN still exists but is unreachable), the kubeconfig points to an old cluster, or a private cluster is being accessed from outside its VNet.

az aks show -g $RG -n $CLUSTER --query "{power:powerState.code, fqdn:fqdn, private:apiServerAccessProfile.enablePrivateCluster}"
kubectl config get-contexts

Fix: az aks start; run get-credentials --overwrite-existing again; for a private cluster, use az aks command invoke or a jump box (hour 2).

(OperationNotAllowed) Operation is not allowed because there's an in progress create managed cluster operation

Cause: A previous long-running operation hasn't finished yet (AKS allows only one modifying operation at a time).

az aks show -g $RG -n $CLUSTER --query provisioningState -o tsv
az aks wait -g $RG -n $CLUSTER --updated
Node NotReady: KubeletNotReady / container runtime network not ready: NetworkReady=false

Cause: A CNI component isn't ready (the node just joined, azure-cns is unhealthy, or outbound traffic is blocked so component images can't be pulled).

kubectl describe node NODE | sed -n '/Conditions/,/Addresses/p'
kubectl get pods -n kube-system -o wide --field-selector spec.nodeName=NODE

Fix: Wait for the new node to finish initializing. Check outbound rules. If the node stays NotReady, AKS automatic node repair steps in. For a deeper investigation, see hour 7.

Command-line exercises
1. Add a maintenance window for node OS updates that starts Sundays at 03:00 (UTC+8) and lasts 4 hours.
az aks maintenanceconfiguration add -g $RG --cluster-name $CLUSTER -n aksManagedNodeOSUpgradeSchedule --schedule-type Weekly --day-of-week Sunday --interval-weeks 1 --start-time 03:00 --duration 4 --utc-offset +08:00
2. List all PDBs in every namespace where ALLOWED DISRUPTIONS is 0.
kubectl get pdb -A -o jsonpath='{range .items[?(@.status.disruptionsAllowed==0)]}{.metadata.namespace}/{.metadata.name}{"\n"}{end}'
Scenario analysis
On Friday you need to hand aks-lab to the business team as a “pre-production” environment. Based on the review results, list 3 items that must be done before handover and 3 items that can be scheduled for later hours, and explain why.

Must be done before handover: ① Change the pricing tier to Standard (no downtime, in exchange for the SLA); ② Maintenance window + PDB (completed in Lab 8), so automatic upgrades stay controlled and don't get stuck; ③ Turn on basic observability (Managed Prometheus, or Container Insights + control plane diagnostic logs). Otherwise, you'll have no evidence when something goes wrong. Can be scheduled: ① API server access restrictions / private cluster, and moving ingress to Gateway API (hour 2, requires network changes); ② Workload Identity, Key Vault, Policy, Defender (hour 3); ③ Autoscaling and cost optimization (hour 4). Note that settings decided at creation time, such as Pod CIDR and availability zones, already meet requirements, so no rebuild is needed.

Verified teaching videos

▶
Azure Kubernetes Service (AKS) High Availability — John Savill's Technical Training
English · Availability zones, SLA, and high-availability design, covering review items 1, 4, 5, and 8
▶
Upgrading and Maintaining your Azure Kubernetes Service (AKS) Cluster — John Savill's Technical Training
English · Upgrades and maintenance windows, covering review items 2 and 3

Official docs

Video storyboard (about 80 seconds)

Shot 1 · 0–20s
On screen: A ten-box checklist, with the first few ticked and the third and eighth boxes flashing red.
Narration: A cluster that runs apps isn't necessarily production ready. Check it with ten questions: SLA, version, maintenance window, system pool, availability zones, identity, images, resilience, observability, and networking and cost.
Shot 2 · 20–45s
On screen: A maintenance calendar shows a four-hour blue block on Saturday and on Sunday; a PDB shield appears next to myapp.
Narration: Add a maintenance window and a PodDisruptionBudget, and upgrades become both automatic and controlled.
Shot 3 · 45–70s
On screen: A seven-floor failure layer diagram. An elevator goes down from the top floor and stops at the “Image layer,” showing 401.
Narration: Troubleshoot from the top down: ARM, resource providers, access, scheduling, images, services, nodes. The format of the error code tells you which layer you're on.
Shot 4 · 70–80s
On screen: The scorecard jumps from 52 to 72 points. The remaining red boxes each point to hours 2 through 6.
Narration: Whatever isn't met is your learning path for the next seven hours.
or score ≥ 70% on the quiz

Command cheat sheet

AKS core fundamentals · Azure CLI 2.93 · Every code block can be copied with one click
After-class reference

Environment and variables

az version; az upgrade --yes; az login
az account set --subscription "<sub>"
sudo az aks install-cli            # kubectl + kubelogin
source ~/.aks-lab.env              # RG / LOC / CLUSTER / ACR
az provider register -n Microsoft.ContainerService --wait
az aks get-versions -l $LOC -o table
az vm list-usage -l $LOC -o table | grep -i dsv5

Create (Standard)

az aks create -g $RG -n $CLUSTER -l $LOC \
  --tier free --kubernetes-version 1.36 \
  --nodepool-name system --node-count 2 \
  --node-vm-size Standard_D4s_v5 --zones 1 2 3 \
  --network-plugin azure --network-plugin-mode overlay \
  --pod-cidr 192.168.0.0/16 \
  --enable-aad --enable-azure-rbac \
  --enable-oidc-issuer --enable-workload-identity \
  --auto-upgrade-channel patch --node-os-upgrade-channel NodeImage \
  --generate-ssh-keys --no-wait
az aks wait -g $RG -n $CLUSTER --created

Create (Automatic) and view

az aks create -g $RG -n aks-lab-auto -l $LOC \
  --sku automatic --enable-hosted-system
az aks show -g $RG -n $CLUSTER --query "{sku:sku, v:currentKubernetesVersion, nodeRG:nodeResourceGroup, fqdn:fqdn}"
az aks show -g $RG -n $CLUSTER --query networkProfile
az resource list -g MC_${RG}_${CLUSTER}_${LOC} -o table

Pricing tier and support plan

az aks update -g $RG -n $CLUSTER --tier standard
az aks update -g $RG -n $CLUSTER --tier free
az aks update -g $RG -n $CLUSTER --tier premium \
  --k8s-support-plan AKSLongTermSupport --auto-upgrade-channel patch
az aks update -g $RG -n $CLUSTER --tier standard \
  --k8s-support-plan KubernetesOfficial
az aks get-upgrades -g $RG -n $CLUSTER -o table

Node pools

az aks nodepool add -g $RG --cluster-name $CLUSTER -n userpool \
  --mode User --node-count 2 --node-vm-size Standard_D2s_v5 --zones 1 2 3
az aks nodepool update -g $RG --cluster-name $CLUSTER -n system \
  --node-taints CriticalAddonsOnly=true:NoSchedule
az aks nodepool update ... --node-taints ""        # remove the taint
az aks nodepool scale -g $RG --cluster-name $CLUSTER -n userpool --node-count 3
az aks nodepool list -g $RG --cluster-name $CLUSTER -o table
kubectl get nodes -L kubernetes.azure.com/mode,kubernetes.azure.com/agentpool,topology.kubernetes.io/zone

Access and authorization

az aks get-credentials -g $RG -n $CLUSTER --overwrite-existing
kubelogin convert-kubeconfig -l azurecli
kubelogin remove-cache-dir
kubectl auth whoami; kubectl auth can-i --list -n myapp
AKS_ID=$(az aks show -g $RG -n $CLUSTER --query id -o tsv)
az role assignment create --role "Azure Kubernetes Service RBAC Writer" \
  --assignee-object-id $OID --assignee-principal-type Group \
  --scope $AKS_ID/namespaces/myapp
az aks update -g $RG -n $CLUSTER --disable-local-accounts
# break-glass: --enable-local-accounts → get-credentials --admin → disable again

Add-ons and extensions

az aks addon list -g $RG -n $CLUSTER -o table
az aks enable-addons -g $RG -n $CLUSTER -a azure-keyvault-secrets-provider
az aks disable-addons -g $RG -n $CLUSTER -a azure-keyvault-secrets-provider
az aks update -g $RG -n $CLUSTER --enable-keda | --enable-vpa | --enable-app-routing
az aks update -g $RG -n $CLUSTER --enable-azure-monitor-metrics
az extension add -n k8s-extension
az k8s-extension list -g $RG -c $CLUSTER -t managedClusters -o table
kubectl get pods -A -l kubernetes.azure.com/managedby=aks

ACR and releases

az acr create -n $ACR -g $RG --sku Basic
az acr build -r $ACR -t myapp:1.0 --build-arg APP_VERSION=1.0 .
az acr import -n $ACR --source docker.io/library/redis:7.4-alpine --image redis:7.4-alpine
az aks update -g $RG -n $CLUSTER --attach-acr $ACR    # --detach-acr
az aks check-acr -g $RG -n $CLUSTER --acr $ACR.azurecr.io
kubectl -n myapp set image deploy/myapp myapp=$ACR.azurecr.io/myapp:1.1
kubectl -n myapp rollout status deploy/myapp; kubectl -n myapp rollout undo deploy/myapp

Reviews and maintenance

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 4 --utc-offset +00:00
az aks maintenanceconfiguration list -g $RG --cluster-name $CLUSTER -o table
az advisor recommendation list --ids $AKS_ID -o table
kubectl get pdb -A
kubectl get events -A --field-selector type=Warning --sort-by=.lastTimestamp

Stop, start, and cleanup

az aks stop  -g $RG -n $CLUSTER       # stops compute charges (disks and IPs are still billed)
az aks start -g $RG -n $CLUSTER
az aks delete -g $RG -n aks-lab-auto --yes --no-wait
az group delete -n $RG --yes --no-wait   # delete everything (including MC_*, ACR)

Key facts at a glance (2026-11-15)

TopicFact
VersionLatest GA 1.37 (LTS version), new clusters default to 1.36, community support N-2, platform support N-3, 60-day grace period, platform-initiated upgrades starting 2027-06-01
Pricing tierFree: no SLA, recommended <10 nodes, max 1,000; Standard/Premium: 99.95% (AZ) / 99.9%, max 5,000; Premium = Standard + LTS
LTSPremium + AKSLongTermSupport; community 1 year + LTS 1 year; only the latest 2 patches are supported; Calico is not supported
Automatic--sku automatic, CLI ≥ 2.86, Standard tier + Pod readiness SLA (99.9% within 5 minutes), managed system node pool, NAP, Cilium, managed NAT, Azure RBAC, deployment safeguards, no Windows
System poolLinux, ≥ 2 nodes (3 recommended), ≥ 4 vCPU/4 GB, not B-series, ≥ 30 Pods, cannot be Spot, taint CriticalAddonsOnly=true:NoSchedule
EntraCannot be turned off once enabled; kubelogin audience 6dae42f8-4368-4678-94ff-3960e28e3630; devicecode doesn't work with Conditional Access; 4 RBAC data-plane roles + Cluster User Role
ACR--attach-acr = kubelet identity + AcrPull, created by the CLI with your permissions; not supported on registries in ABAC mode
Default networkingCLI default is Azure CNI Overlay; kubenet retires 2028-03-31

Capstone lab + final quiz

From an empty resource group to myapp serving traffic on AKS, and passing one readiness review
After class ≈ 45 minutesCovers all modulesCost about US$1
Scenario You're a platform engineer, and you need to deliver a “pre-production” AKS cluster for the myapp team: Kubernetes 1.36, system and user pools separated and spread across availability zones, Entra-only sign-in with the team limited to the myapp namespace, images only from your own ACR, and maintenance windows and PDBs in place. Finally, deliver a review report and stop or clean up as needed. You can do the “acceptance” on the aks-lab built in Modules 1–8, or delete the resource group and start from scratch (recommended, to check whether you've really mastered it).
Preparation (Module 0)
source ~/.aks-lab.env
az version --query '"azure-cli"' -o tsv
az group create -n $RG -l $LOC -o none
az aks get-versions -l $LOC -o table | head -6
Create the cluster (Modules 1–3): Use the commands from “Create (Standard)” in the cheat sheet. While waiting, note which parameters can be changed after creation.
az aks wait -g $RG -n $CLUSTER --created --interval 30
az aks show -g $RG -n $CLUSTER --query "{state:provisioningState, sku:sku, v:currentKubernetesVersion, nodeRG:nodeResourceGroup}" -o yaml
Identity and access (Module 5)
AKS_ID=$(az aks show -g $RG -n $CLUSTER --query id -o tsv)
az role assignment create --role "Azure Kubernetes Service RBAC Cluster Admin" \
  --assignee-object-id $(az ad signed-in-user show --query id -o tsv) --assignee-principal-type User --scope $AKS_ID -o none
az aks get-credentials -g $RG -n $CLUSTER --overwrite-existing
kubelogin convert-kubeconfig -l azurecli
kubectl create namespace myapp
az aks update -g $RG -n $CLUSTER --disable-local-accounts -o none
Node pools (Module 4)
az aks nodepool add -g $RG --cluster-name $CLUSTER -n userpool --mode User --node-count 2 \
  --node-vm-size Standard_D2s_v5 --zones 1 2 3 --labels workload=apps
az aks nodepool update -g $RG --cluster-name $CLUSTER -n system --node-taints CriticalAddonsOnly=true:NoSchedule
kubectl get nodes -L kubernetes.azure.com/mode,topology.kubernetes.io/zone
Add-ons (Module 6)
az aks enable-addons -g $RG -n $CLUSTER -a azure-keyvault-secrets-provider -o none
kubectl get pods -n kube-system -l kubernetes.azure.com/managedby=aks | wc -l
ACR and release (Module 7): Follow Module 7's lab steps 1–5 to build myapp 1.0/1.1, import Redis, run --attach-acr and check-acr, and deploy and roll out to 1.1.
kubectl -n myapp get deploy,svc,pods -o wide
curl -s http://$(kubectl -n myapp get svc myapp -o jsonpath='{.status.loadBalancer.ingress[0].ip}')/
Readiness review and gap closing (Module 8): Add the two maintenance windows and the PDB for myapp, run the review script, record the score on the scorecard, and write three follow-up improvement items (mapped to hours 2–6).
Stop or clean up
# Pause only (keeps everything; nodes are not billed):
az aks stop -g $RG -n $CLUSTER
# Full cleanup (hour 2 recreates the cluster in your own VNet, vnet-aks-lab; ~/.aks-lab.env is kept, and the ACR name will be created again in the next hour):
az group delete -n $RG --yes --no-wait
az group list --query "[?starts_with(name,'MC_rg-aks-lab')].name" -o tsv   # should be empty after a few minutes
kubectl config delete-context $CLUSTER
Acceptance checklist

Open-ended self-check (answer first, then expand the reference answers)

1. Draw (or describe) the resources an AKS cluster involves and where they live.

The control plane (API server, etcd, scheduler, controller-manager, cloud-controller-manager) runs in a Microsoft-managed subscription. The cluster resource managedClusters/aks-lab is in rg-aks-lab. The node resource group MC_rg-aks-lab_aks-lab_canadacentral contains VMSS, the managed VNet/NSG, the load balancer and public IP, the kubelet identity and add-on identities, and disks. The ACR is in rg-aks-lab. For Automatic, the system nodes are in AKS's subscription.

2. What's the difference between Free, Standard, and Premium? When do you need LTS?

Free has no financially backed SLA and is recommended for fewer than 10 nodes. Standard provides a 99.95% (availability zones) / 99.9% API server SLA and supports up to 5,000 nodes. Premium = Standard + LTS. LTS suits environments that can't upgrade the minor version at least once a year (compliance freezes, complex dependencies). It requires --k8s-support-plan AKSLongTermSupport, provides about 24 months of support, and supports only the latest two patches.

3. In order, name the stages behind az aks create.

The CLI sends a PUT → ARM handles authentication, RBAC, and Policy, forwards the request, and returns an async operation → the AKS RP validates (version, quota, CIDR), creates the cluster identity and MC_* → the control plane starts in the Microsoft subscription (certificates, FQDN, Entra, OIDC) → the VNet/NSG/LB/public IP/kubelet identity are created in MC_* → the VMSS is created, and CSE bootstraps the nodes → kubelet TLS bootstrap registers the Node → kube-system components are deployed, nodes become Ready, and the status is Succeeded. If you used --attach-acr, the CLI then creates the AcrPull assignment with your permissions.

4. A developer who just joined the team says, “I can run get-credentials, but every kubectl command returns Forbidden.” What's the cause, and how do you fix it?

They have the control-plane Cluster User Role (they can download the kubeconfig) but no data-plane role. Assign Azure Kubernetes Service RBAC Writer or Reader at the scope $AKS_ID/namespaces/myapp (preferably to the group they belong to). After it takes effect, run kubelogin remove-cache-dir and try again.

5. After the system pool taint is enabled, all application Pods are Pending. Why? What do you do?

The app has no CriticalAddonsOnly toleration, so it can only run on pools without the taint. Either the user pool doesn't exist, has zero nodes, or lacks resources. Add or scale up a user pool (or enable autoscaling). Don't add system tolerations to the apps.

6. When something goes wrong, who do you contact for add-ons, cluster extensions, and self-installed Helm charts? How do they differ?

Add-ons belong to the AKS RP, so you open an AKS ticket, and their minor version follows Kubernetes upgrades. Extensions belong to Microsoft.KubernetesConfiguration, so you open a ticket with the corresponding service, and they upgrade under the extension's own policy. Self-installed open source is outside AKS support, so you and the community / vendor are responsible for its versions, CVEs, and failures.

Final quiz (12 questions, covering all modules)

Sources and versions

Sources for every technical fact in this hour (verified on 2026-11-15)
TopicVerification resultSources (accessed 2026-11-15)
Version calendar and support policyGA / EOL / platform support / LTS end months for 1.33–1.38; N-2 community support, N-3 platform support, 60-day grace period; platform-initiated upgrades don't follow maintenance windows and don't run deprecated API checks; kubectl skew ±1; the control plane and node pools can differ by up to 3 minor versions (since 1.28) (page ms.date 2026-09-15, updated 2026-10-21)Supported Kubernetes versions
Latest AKS releaseRelease 2026-10-25 (v20261025): 1.37 GA and marked as LTS, 1.36 is the default for new clusters; patches 1.37.1 / 1.36.5 / 1.35.9 / 1.34.12; community support for 1.34 and LTS for 1.31 end in 2026-11; starting with 1.38, the Ubuntu OS SKU defaults to Ubuntu 26.04; Base → Automatic conversion in preview; platform-initiated upgrades starting 2027-06-01github.com/Azure/AKS releases
Pricing tierThree-tier comparison, SLA 99.95% / 99.9%, Free recommended for <10 nodes (up to 1,000), Standard/Premium up to 5,000; Premium must also set AKSLongTermSupport; Automatic presets the Standard tier; in regions that support availability zones, the control plane is deployed across zones by default (ms.date 2026-07-06)Pricing tiers · AKS pricing (prices on the page could not be read when verified; see Known limitations)
LTSCommunity 1 year + LTS 1 year; can be enabled on all supported versions; only the latest two patches are supported; enable/disable commands; Calico returns LTSUnsupportedAddon; OSM add-on supported until 2027-09-30; Pod managed identity retires 2025-09 (updated 2026-11-07)Long-term support
AKS AutomaticStandard vs Automatic feature comparison table, Pod readiness SLA, managed system node pool, Gateway API by default from 1.36; quick start: CLI ≥ 2.86.0, 46 GA regions (including canadacentral), Windows / Dapr / Azure ML not supported, Microsoft.PolicyInsights must be pre-registered, --sku automatic --enable-hosted-system, the CLI grants RBAC Cluster Admin at creation timeIntro to AKS Automatic · Quickstart
Core conceptsControl plane components, node components (kube-proxy or Cilium), node resource group, managed component label kubernetes.azure.com/managedby: aks, aks-managed Helm release, VM sizes dynamically selected by AKS since 2025-05, Standard uses Ubuntu by defaultAKS core concepts
az aks create parametersaz aks create --help on local Azure CLI 2.84.0: --network-plugin defaults to azure, --network-plugin-mode defaults to overlay, --network-dataplane defaults to azure, --outbound-type defaults to loadBalancer, --node-count defaults to 3, --nodepool-name defaults to nodepool1, --pod-cidr notes that kubenet retires on 2028-03-31, --sku automatic|base, --tier, --k8s-support-plan; see the Learn reference page for --enable-hosted-systemaz aks reference · local CLI help
Azure CLI / kubelogin versionsAzure CLI 2.93.0 (2026-11-15); kubelogin v0.2.22 (2026-10-24)azure-cli releases · kubelogin releases
System node poolLabels and taints, ≥30 Pods, Linux, ≥2 nodes (3 recommended), ≥4 vCPU / 4 GB, no B-series, Spot only on user pools, changing the mode does not migrate Pods, pool name rules (ms.date 2026-04-30)Use system node pools
Entra and kubeloginEntra integration cannot be turned off; break-glass requires AKS Contributor; kubelogin login methods, default devicecode, Conditional Access limits, cache directory, server app ID 6dae42f8… and public client ID 80faf920… (2026-09-09)Entra authentication · kubelogin
Add-ons and extensionsAdd-on list and upgrade rules (patches ship weekly, minor versions follow Kubernetes, about 60 days’ notice), RP differences between add-ons and extensions; extension capability matrix, core extensions, and the move of Azure Monitor to the extension backendIntegrations · Cluster extensions
ACR integrationAcrPull assigned to the kubelet identity, required roles, attach not supported in ABAC mode (use Container Registry Repository Reader), Entra group propagation delay, check-acr, proxy noProxy (ms.date 2026-05-08)Integrate ACR with AKS

Video verification notes

The following videos were checked on 2026-11-15 through the YouTube oEmbed API for their titles and channels: John Savill's Technical Training, “Azure Kubernetes Services (AKS) Overview” (c4nTKMU6fBU), “Azure Kubernetes Service (AKS) High Availability” (gksFrKiZjMc), “Upgrading and Maintaining your Azure Kubernetes Service (AKS) Cluster” (soLCemusoE8); Microsoft Events, “From zero to Kubernetes with AKS Automatic | BRK121” (DKEo7LqpVAM); Azure Kubernetes Service (AKS) official channel, “What is AKS Automatic? A full features Guide for AKS Automatic - Azure Kubernetes Service” (S5cJFJ719Hg), “Kubernetes the Easy Way with AKS Automatic” (-K3Dk6qwHiM), “AKS Node Auto Provisioning (NAP) - Feature Overview (Azure Kubernetes Service)” (1BCsuy35JKg), “AKS Community Calls - October 2026” (BsFyAf0gWdM); Houssem Dellai, “Introduction to AKS Automatic” (oRZZZox1D58), “Kubernetes and AKS versions” (YMN9uhjX3RY), “Kubelogin to connect to Kubernetes” (XFWphg4EYL0), “Kubernetes Nodepools explained” (lNblN3_oog4); Programming with Wolfgang, “Authentication in Azure Kubernetes Service (AKS) explained” (tuXJMHfNqyU); cloud-monk - cloud in plain english, “Azure Kubernetes Services (AKS) Node Pools explained in plain English” (45UxnRj11_g), “AKS Integration with Azure AD explained in plain English - Azure RBAC, Kubernetes RBAC, Kubeconfig” (ABbJWP6TToc); Andrei Barbu - courscape com, “Integrate AKS and ACR to allow pulling images (multiple methods)” (rE8LJvoWxj4). oEmbed does not return durations or publish dates, so the cards do not list durations. Most of the videos were recorded before 2026. For the kubenet default, pricing, LTS, and platform-initiated upgrades, this hour is the reference. No verified video covering the 2026 version policy and the add-on/extension comparison was found, so the related module provides a storyboard script instead.

Voice narration notes

The “Voice” tab uses the browser’s Web Speech API (speechSynthesis, en-US) to read the narration script aloud in real time, and English terms are pronounced in en-US. The result depends on the voices installed on your operating system. This courseware has no embedded MP3. If you need offline audio, send the narration script to a TTS service to generate it.

Known limitations

  • The az / kubectl commands in this courseware have not been run against a real Azure subscription. All “expected output” examples are constructed from the official docs and CLI help. Name suffixes, IPs, GUIDs, times, node image versions, patch numbers, and error wording will differ, so your actual output takes precedence.
  • The AKS pricing page showed only placeholders when verified, so the hourly prices for Standard / Premium / Automatic could not be read. The “about 0.10 / 0.60 USD per cluster-hour” figures in the text are historical public prices. The cost estimate (about 0.7–0.9 USD/hour) is a rough example based on pay-as-you-go VM prices. Use the Azure pricing calculator with canadacentral to work out your own costs.
  • The local Azure CLI is 2.84.0, which is below the 2.86.0 that Automatic requires, so parameters such as --enable-hosted-system are based on the Learn docs and the quick start rather than local help. The quick start example that was missing a line-continuation character has been fixed in this hour.
  • The Automatic quick start says “migrating from Base to Automatic is not supported,” but the 2026-10-25 release notes announce a preview of Base → Automatic conversion. This hour treats it as “preview, use with caution.”
  • The “AKS Automatic vs Standard” comparison table says Standard defaults to kubenet, but the CLI help shows the default is Azure CNI Overlay. This hour follows the CLI behavior and sets the network parameters explicitly in all examples.
  • The initial login method written by az aks get-credentials can vary by CLI version and environment (devicecode or others). This hour recommends running kubelogin convert-kubeconfig -l azurecli consistently.
  • Animations and simulators simplify some real mechanisms (for example, parallel steps inside the RP, CSE details, credential provider caching, and scheduler scoring). They illustrate order and cause and effect, but they do not cover every edge case.