Azure Kubernetes Service (AKS): The Complete Advanced Guide
A book-style walk through how AKS is built, how it behaves under the hood, how to secure, scale, upgrade and observe it, and which patterns and mistakes separate calm production clusters from stressful ones.
Picture a huge airport with hundreds of planes landing and taking off every hour. Somebody has to run the control tower, keep the runways repaired, track every plane, and send replacements when one breaks down. Now imagine you only want to run an airline. You want to decide which planes fly where, how many seats they carry, and how fast they turn around. You do not want to pour concrete or hire air traffic controllers. Azure Kubernetes Service, usually called AKS, plays the role of that airport authority. Microsoft runs the tower and the runways. You run the airline.
This guide takes that idea all the way down. We begin with the simple “why”, then climb through architecture, networking, scaling, storage, security, upgrades, monitoring, cost and design patterns. Every new term is explained the first time it appears, and almost every idea has a real-life comparison so it sticks. By the end you should be able to explain AKS to a beginner, design a sensible production cluster, and spot the traps that quietly hurt teams six months after launch.
1What Is AKS and Why Does It Exist?
AKS is Microsoft’s managed way to run Kubernetes on Azure, so teams spend their time on applications instead of on cluster plumbing.
The problem containers solved
Years ago, moving software from a developer’s laptop to a server was painful. The app worked on one machine and failed on another because a library was missing or a setting was different. A container fixes this by packing the application together with everything it needs to run. The package behaves the same everywhere, whether it sits on a laptop, a test server or a cloud machine.
Think of the steel shipping container on a cargo ship. The crane does not care whether the box holds shoes or bananas. Every box has the same shape, so ports, trucks and ships can all move it. A software container works the same way: the platform does not need to know what is inside to move it, start it or stop it.
Why Kubernetes appeared
One container is easy to run. Five hundred containers spread over fifty machines is a different story. Somebody must decide which machine runs which container, restart the ones that crash, add more copies when traffic grows, and route visitors to the right place. Doing this by hand is slow and error-prone. Kubernetes is the open-source system that does this work automatically. You describe what you want, such as “run six copies of my web app”, and Kubernetes keeps reality matching that description.
Kubernetes is the conductor of an orchestra. The musicians are containers. The conductor does not play any instrument, but without the conductor the musicians would start at different times, play at different speeds and drown each other out. The conductor keeps everyone in time and replaces a player who walks off stage.
Why a managed service on top of Kubernetes
Running Kubernetes yourself is possible, but the cluster has a brain, called the control plane, that must always be healthy. It stores the entire cluster state in a small database, signs certificates that expire, needs backups, and must be upgraded carefully every few months. If the brain fails, you cannot deploy, scale or heal anything. Many teams discovered that looking after the brain consumed more effort than looking after their own products.
AKS removes that burden. Azure creates, runs, patches and repairs the control plane for you. You still own the worker machines and everything that runs on them, but the hardest, most delicate part is in expert hands. You get the same Kubernetes that the whole industry uses, with the same tools and the same concepts, plus tight links to the rest of Azure such as identity, networking, storage and monitoring.
Building your own Kubernetes control plane is like building your own house, wiring and plumbing included. AKS is like renting a well-kept apartment. You still choose the furniture and how you live inside, but the landlord fixes the roof and the pipes.
Who looks after what: the shared responsibility idea
With a managed service, responsibility is split. It is important to know exactly where the line sits, because many outages happen in the gap between “I thought Azure handled that” and “Azure thought you handled that”.
| Area | Azure looks after | You look after |
|---|---|---|
| Control plane | Running, patching, scaling and repairing the cluster brain | Choosing a tier and planning version upgrades |
| Worker nodes | Providing images and the machinery to upgrade them | Choosing sizes, scaling rules and when to apply updates |
| Networking | The plumbing that connects pods and the control plane | Address planning, traffic rules and exposure to the internet |
| Applications | Nothing inside your containers | Code, images, resource requests, health checks and data |
| Security | Secure defaults and tools such as policy and scanning | Access rules, secrets handling and workload hardening |
A managed control plane does not mean a self-managing cluster. Azure keeps the brain healthy, but a badly sized node pool, a missing health check or an open network path is still your decision and your problem.
Where AKS fits among Azure compute choices
Azure offers several ways to run software. Virtual machines give you the most control and the most chores. Simple app hosting services give you the least control and the least work. AKS sits in the middle: strong control over how applications are packaged, connected and scaled, without managing a fleet of hand-built servers. It is a good fit when you have many services, need fine control over networking and scaling, or want portability because Kubernetes skills and tools travel across clouds.
Good fit: many cooperating services
A shop with a catalog service, a cart service, a payment service and a search service can run each as its own set of containers and scale them independently when a sale begins.
Good fit: platform for many teams
A central platform team can offer one shared, well-governed cluster where dozens of product teams deploy safely using common rules for security, cost and monitoring.
Weaker fit: one small website
If you only have a single simple site with low traffic, a simpler hosting service usually costs less effort. Kubernetes adds power, but power brings complexity you may not need.
2Core Kubernetes Concepts You Must Know First
AKS is Kubernetes with Azure wiring, so every AKS discussion rests on a small set of Kubernetes building blocks.
The big idea: desired state and the reconciliation loop
The most important idea in Kubernetes is that you do not give step-by-step orders. You declare a goal, called the desired state, such as “I want four copies of this application running”. Kubernetes continuously compares that goal with what is actually running, which is the current state. When they differ, controllers take action until they match. This loop never stops.
A thermostat works like this. You set the room to 22 degrees. The thermostat does not need to be told when to heat or cool. It checks the temperature, sees the gap, and acts until the gap closes. Kubernetes treats your applications the way a thermostat treats a room.
The building blocks
Cluster
The whole system: one control plane plus a group of worker machines. Think of it as one entire shopping mall.
Node
One worker machine, usually a virtual machine in Azure, that runs your containers. A node is a single shop unit inside the mall.
Pod
The smallest thing Kubernetes runs. A pod holds one or a few tightly linked containers that share an address and storage. It is like a single food stall.
Deployment
A rule that says how many identical pods to keep alive and how to roll out a new version. It is the shop manager’s staffing plan.
Service
A stable address in front of changing pods. Pods come and go, but the service name stays put, like a shop’s phone number that survives staff changes.
Ingress and Gateway
Rules that let traffic from outside the cluster reach the right service, such as sending the shop page and the account page to different places.
Namespace
A named section inside a cluster used to separate teams or projects. It works like floors in the mall, each floor with its own rules.
ConfigMap and Secret
Places to keep settings and sensitive values outside the container image, so the same image can run in test and production with different settings.
StatefulSet
Like a deployment, but for applications that need a stable name and their own storage, such as databases. Each member keeps its identity after a restart.
DaemonSet
Makes sure one copy of a pod runs on every node. It suits agents that collect logs or watch security, like a guard posted at every door.
Job and CronJob
Run work that finishes, either once or on a schedule. Think of a cleaning crew that arrives every night, finishes, and leaves.
Persistent Volume
Storage that outlives any single pod. When a pod dies, the data stays and can be attached to its replacement.
Labels and selectors: how things find each other
Kubernetes uses simple name tags called labels to group objects. A service finds its pods by asking for every pod that carries a certain label. This loose link is powerful because nothing is wired by fixed address. If a pod disappears and a new one appears with the same label, the service automatically includes it.
Resource requests and limits
Every container can say how much processing power and memory it needs, which is called a request, and the most it may use, which is called a limit. The scheduler uses requests to decide which node has room. Limits protect neighbors from a greedy container. Many production problems later in this guide trace back to missing or unrealistic requests, so keep this idea in mind.
A pod is not a virtual machine and it is not permanent. Pods are designed to be replaced at any moment. Anything you need to keep must live in storage or a database outside the pod, never only inside it.
3AKS Architecture: Control Plane and Data Plane
An AKS cluster has two halves: a managed brain that Azure runs and a set of worker machines that live in your subscription.
The two halves
Every AKS cluster is split into the control plane and the data plane. The control plane makes decisions and stores state. The data plane, also called the worker side, does the actual work of running your containers. The split is the heart of the managed model: Azure owns the first half, and you share ownership of the second.
flowchart TD
U["You and your pipelines"] --> API["Kubernetes API server"]
subgraph CP["Control plane - managed by Azure"]
API --> ETCD["State store"]
API --> SCH["Scheduler"]
API --> CM["Controller manager"]
API --> CCM["Cloud controller manager"]
end
subgraph DP["Data plane - worker nodes in your subscription"]
N1["Node 1 with kubelet and pods"]
N2["Node 2 with kubelet and pods"]
N3["Node 3 with kubelet and pods"]
end
API --> N1
API --> N2
API --> N3
CCM --> AZ["Azure resources: load balancers, disks, networks"]
What lives in the control plane
The control plane is the cluster’s office staff. It receives every request, remembers the cluster’s state, decides where new pods should run, and talks to Azure when the cluster needs a load balancer or a disk. In AKS you never see or log into these machines. You only talk to them through the Kubernetes API, using command-line tools, dashboards or automation.
In regions that support availability zones, the control plane of a cluster is automatically spread across zones, so a problem in one building of the data center does not take down the cluster’s brain. This spreading happens regardless of how you place your own nodes, which is a quiet but valuable benefit.
What lives in the data plane
The data plane is made of virtual machines that Azure creates in your subscription and organizes into groups called node pools. Each machine runs a small agent called the kubelet that listens to the control plane, starts containers when told to, and reports health back. Your applications run here, and so do some system helpers such as the cluster’s internal name service.
In a restaurant, the control plane is the manager’s office with the reservation book, the staff schedule and the phone lines. The data plane is the kitchen and the dining room where food is actually cooked and served. Customers never visit the office, but the restaurant stops working if the office does.
The node resource group
When you create a cluster, AKS makes a second resource group, separate from the one you named, to hold the infrastructure the cluster needs. Inside it you will find the virtual machine scale sets, network interfaces, load balancers, public addresses and disks. This group exists for AKS to manage.
Manually renaming, resizing or deleting items in the node resource group can break the cluster in ways that are difficult to explain and repair. Make changes through AKS itself, through the Kubernetes API, or through your infrastructure automation, never by clicking around in that group.
How you talk to the cluster
You prove who you are
Most teams sign in through Microsoft Entra ID, so the cluster knows which person or automation is knocking.
The API server checks permission
Access rules decide whether that identity may create, read, change or delete the thing it asked about.
The request is validated and saved
Policies can reject unsafe requests. If all is well, the desired state is written to the cluster’s state store.
Controllers and nodes act
Controllers notice the new goal, the scheduler picks nodes, and kubelets on those nodes start the containers.
Public and private access to the control plane
By default the API server has a public address protected by identity checks. Many organizations prefer a private cluster, where the API server is reachable only from inside their own network. There are also options that let you limit which internet addresses may reach the public endpoint. Choosing between these is one of the first real security decisions you will make, and it is easier to decide at creation time than to change later.
4Cluster Components in Depth
Each part of the control plane and each part of a node has one clear job, and knowing those jobs makes troubleshooting far easier.
Control plane components
API server
The front door. Every tool, person and internal component talks to the cluster through it. It checks identity, permissions and policy before accepting anything.
State store
A reliable key-value database, called etcd, that holds every object in the cluster. It is the single source of truth, like the master ledger of a bank.
Scheduler
Chooses which node should run each new pod by looking at free capacity, rules and preferences. It is the seating host who finds a table for each party.
Controller manager
Runs the many small loops that compare desired and current state, such as keeping the right number of pod copies alive.
Cloud controller manager
The translator between Kubernetes and Azure. When a service needs an external load balancer, this component asks Azure to create one.
Node components
Kubelet
The node’s resident manager. It receives instructions, starts containers, checks their health and reports back to the control plane.
Container runtime
The engine that actually pulls images and runs containers. AKS uses containerd, a lean, widely adopted runtime.
Networking dataplane
The part that moves packets between pods and services and enforces network rules. Depending on your choices this can be the classic approach or one powered by Cilium.
Cluster DNS
The internal phone book that turns service names into addresses, so one application can find another by name.
Storage drivers
Container Storage Interface drivers that connect pods to Azure disks, files and blob storage.
Metrics and agents
Small helpers that report resource usage and ship logs so autoscaling and monitoring have facts to work with.
Node pools: groups of identical machines
A node pool is a group of nodes that share the same machine size, operating system and settings. Behind the scenes, each pool is backed by an Azure virtual machine scale set, which is the Azure feature that can add or remove identical machines on demand. A cluster can have many pools, so you can mix small general-purpose machines with large memory-heavy ones or with graphics-capable ones for machine learning.
A node pool is like a team of delivery vehicles of one type. You might keep a team of small vans for everyday parcels, a team of trucks for heavy loads, and a team of refrigerated vehicles for special goods. Each team can grow or shrink on its own.
System pools and user pools
| Feature | System node pool | User node pool |
|---|---|---|
| Main purpose | Runs the cluster’s own helper components | Runs your application workloads |
| Required | Every cluster needs at least one | Optional, but strongly recommended |
| Typical sizing | Small and steady, spread across zones | Sized and scaled to match demand |
| Risk if overloaded | Cluster services slow down or fail | Only your applications are affected |
| Good practice | Keep applications off it using taints | Use several pools for different workload types |
The reason to separate them is protection. If your application suddenly eats all available memory on a shared pool, the cluster’s name service could starve and every other application would lose the ability to find its neighbors. Keeping system helpers on their own pool means a runaway application can hurt only itself.
Operating system choices
AKS nodes can run Linux or Windows. For Linux, Ubuntu has long been the common choice, and Microsoft also offers its own Azure Linux distribution designed to be small and well maintained, along with newer container-focused options. Windows node pools exist for applications that must run on Windows. Operating system support changes over time, so always check the current support notes before choosing, and avoid mixing many different operating systems unless you truly need to.
Taints, tolerations and affinity in plain words
Sometimes you want to control where pods land. A taint on a node says “keep away unless you are specially allowed”. A toleration on a pod says “I am allowed”. Affinity and anti-affinity rules let pods say “place me near these” or “place me away from those”. Together they let you reserve expensive machines for the workloads that need them and spread copies of one application across different machines so a single failure cannot remove them all.
Give each important workload a clear home. Use dedicated pools with taints for special hardware and use spread rules for anything that must stay available. Leaving every pod to land wherever there is room is how clusters end up with all replicas of one service on the same machine.
5AKS Standard, AKS Automatic and the Pricing Tiers
Two things are easy to mix up: the operating mode of a cluster, and the tier you pay for to manage its control plane.
Two operating modes
AKS comes in two modes. AKS Standard gives you direct control over networking, node pools, upgrade policy and cluster features. It is flexible, and it expects you to make many decisions. AKS Automatic, which became generally available in late 2025, is an opinionated mode. Azure picks production-ready defaults for security, networking, scaling, monitoring and upgrades, so you can start deploying applications without first becoming a cluster designer.
AKS Standard is like buying a car with a manual gearbox and a long list of options: you choose everything and can tune everything. AKS Automatic is like a car with the safe settings already chosen and the maintenance handled, where you mainly decide where to drive.
What AKS Automatic sets up for you
An Automatic cluster is preconfigured with the Standard management tier, support for up to 5,000 nodes, a cluster uptime guarantee and a pod readiness guarantee. It enables Microsoft Entra integration and Azure role-based access for authorization, workload identity for pods, network policies, the overlay networking model with the Cilium dataplane, and managed monitoring through Azure Monitor and managed Prometheus. It uses node auto-provisioning, based on the Karpenter project, to add and remove machines as pods need them, and it applies automatic upgrades for both Kubernetes versions and node operating system images.
It also adds deployment safeguards. These are checks that reject risky configurations, such as workloads that omit resource requests or health probes, before they can cause trouble. Managed system node pools, now generally available for Automatic clusters, hand even the care of the system machines to Azure. Despite all this guidance, an Automatic cluster remains fully compatible with the Kubernetes API, so familiar tools and manifests still work.
Advantages of Automatic
- Production-ready defaults from the first minute
- Less operational work for small platform teams
- Built-in guardrails that block common misconfigurations
- Automatic patching and upgrades reduce version drift
- Autoscaling, monitoring and identity are already wired in
Trade-offs of Automatic
- Fewer low-level choices, which can frustrate specialist teams
- Some advanced or unusual configurations may not be allowed
- Safeguards can reject manifests that older workflows accepted
- Teams must still design applications for availability themselves
Three pricing tiers for cluster management
Separately from the mode, every Standard-mode cluster chooses a management tier: Free, Standard or Premium. In all three you pay for the nodes, storage and network you use. The tier decides what extra you get around the control plane.
| Tier | Best for | Uptime guarantee | Scale | Extras |
|---|---|---|---|---|
| Free | Learning, testing, small non-production clusters | No financially backed guarantee, best effort only | Up to 1,000 nodes | All current AKS features |
| Standard | Production and enterprise workloads | Higher availability with zones, lower without | Up to 5,000 nodes | Uptime guarantee on by default, more control plane resources |
| Premium | Teams that cannot upgrade quickly | Same as Standard | Up to 5,000 nodes | Long-term support with Microsoft maintenance past community support |
The uptime guarantee for the Kubernetes API server is stronger when the cluster uses availability zones than when it does not. Check the current service agreement for exact percentages and conditions, since contract terms matter more than blog summaries. Note that the guarantee covers the API server, not your application. If your own pods are poorly designed, no tier will protect you.
Use the Free tier for experiments, the Standard tier for anything customers depend on, and the Premium tier only if you truly need to stay on an older Kubernetes version for longer than the normal support period. Premium is a safety net for slow upgrade cycles, not a substitute for a healthy upgrade routine.
Standard or Automatic: how to decide
Choose Automatic when
Your team is small, you want strong defaults, you value speed to production, and your workloads follow ordinary patterns without exotic networking or operating system requirements.
Choose Standard when
You need precise control of address ranges, node images, upgrade timing or unusual features, or you already have mature platform practices that you do not want to replace.
Mixed approach
Many organizations run Automatic for typical product teams and keep a few Standard clusters for specialist or regulated workloads, then manage them together with common policy.
6Networking Deep Dive
Networking is the part of AKS that is hardest to change later, so it deserves the most careful thinking at the start.
Three kinds of addresses
Every cluster juggles three families of addresses. Node addresses belong to the virtual machines and come from your Azure virtual network. Pod addresses belong to the pods, and where they come from depends on the networking model you choose. Service addresses are virtual, stable addresses that exist only inside the cluster and point at groups of pods. Keeping these three ranges apart, and making sure none overlaps with other networks you must connect to, prevents a whole class of painful surprises.
Think of a big office building. The street address of the building is like a node address. The desk extension numbers used only inside the building are like pod addresses. The department names on the company directory, such as “Billing”, are like service addresses that keep working even when people change desks.
The networking models
Azure CNI Overlay
Nodes use addresses from your virtual network, while pods use a separate private range that is hidden inside the cluster. This saves your address space and scales well. It is the common recommendation for new clusters.
Azure CNI Node Subnet
Pods receive addresses straight from the virtual network subnet, so they are directly reachable from other networks. It is simple to reason about but consumes many addresses.
Azure CNI with Pod Subnet
Pods get addresses from a dedicated subnet separate from the nodes. It gives direct pod reachability with better control than the node subnet model, but still needs a large planned range.
Legacy kubenet
An older, simpler model with extra routing rules and several limits. For new designs, Microsoft guidance points toward the overlay model, so check the current documentation before choosing it.
| Question | Overlay | Node subnet or pod subnet |
|---|---|---|
| Address space used | Very little from your network | A lot, planned in advance |
| Can outside systems reach a pod directly | No, they reach services and ingress instead | Yes, pods have network-visible addresses |
| Ease of scaling large | Easier, fewer limits from address exhaustion | Harder, depends on subnet size |
| Best for | Most new clusters | Cases needing direct pod addressing from other networks |
flowchart LR
subgraph VNET["Your virtual network"]
N1["Node 1 - network address"]
N2["Node 2 - network address"]
end
subgraph OV["Overlay range hidden inside the cluster"]
P1["Pod A - private pod address"]
P2["Pod B - private pod address"]
P3["Pod C - private pod address"]
end
N1 --- P1
N1 --- P2
N2 --- P3
P1 P3
EXT["Other networks"] --> N1
EXT -.->|"reach pods through services and ingress"| P1
The Cilium dataplane
The dataplane is the engine that actually moves packets between pods and enforces network rules. AKS can run it with Cilium, a modern technology built on a feature of the Linux kernel known as eBPF. In simple terms, eBPF lets small safe programs run deep inside the operating system, so network decisions are made quickly and with great visibility. Cilium brings efficient policy enforcement, better observability of traffic flows and room for advanced features such as encryption between pods.
Some capabilities, such as node auto-provisioning, depend on specific networking choices like the overlay model with the Cilium dataplane. These choices are best made when the cluster is created. Retrofitting networking on a busy cluster is possible in some cases but is rarely pleasant.
Network policies: rules for pod-to-pod traffic
By default, every pod in a Kubernetes cluster can talk to every other pod. That is convenient and dangerous. A network policy is a rule that says which pods may talk to which. A good starting position is to deny everything and then allow only the specific conversations your application needs. If one pod is compromised, the attacker finds closed doors instead of an open hallway.
Without network policies, a cluster is like an office where every door is unlocked and any visitor can walk into any room. Network policies are the key cards. The accountant’s door opens only for accountants, and the server room opens only for the server team.
Outbound traffic: how pods reach the internet
Pods often need to call external services, download updates or reach partner systems. AKS offers several outbound paths. The default path uses a load balancer’s public address. A managed network address translation gateway gives more outbound capacity and a stable set of outgoing addresses. Organizations with strict rules can route all outbound traffic through a firewall using custom routes, so every connection is inspected and logged.
Stable outgoing address
When a partner will only accept calls from a known address, use a path that gives your cluster a predictable set of outgoing addresses.
Inspected outgoing traffic
When compliance requires every outbound request to be recorded, send traffic through a central firewall and allow only approved destinations.
Busy outgoing traffic
When many pods open many connections, choose an outbound option with enough capacity so connection limits do not cause random timeouts.
DNS inside the cluster
Pods find each other by name through the cluster’s built-in DNS service. A name lookup that seems instant to a developer actually travels through this service. Under heavy load, DNS can become a bottleneck, and slow lookups look like mysterious application slowness. AKS offers options to run local DNS caching on nodes to reduce that pressure, and newer Automatic clusters preconfigure it.
Choosing a pod or node address range that overlaps with your company’s other networks. Overlap makes routing ambiguous, and fixing it later often means rebuilding the cluster. Agree on address ranges with your network team before creating anything.
7Ingress, Load Balancing and Traffic Entry
Getting visitors into the cluster safely involves several layers, each with a different job.
Service types in a sentence each
A service of the internal type is reachable only inside the cluster. A service of the node-port type opens a port on every node and is rarely used directly. A service of the load-balancer type asks Azure to create a real load balancer with its own address, and the cloud controller manager does that work. Most production traffic from outside enters through a layer that understands web requests rather than through many separate load balancers.
Layer 4 and layer 7 in plain words
A layer 4 load balancer looks only at addresses and ports, like a mail sorter who reads just the street and number on an envelope. A layer 7 load balancer reads the content of web requests, like a receptionist who reads the full request and sends you to the right department. Layer 7 can route by website name or path, handle certificates, and apply security rules.
Azure Load Balancer
Fast, simple layer 4 distribution. It is created automatically for load-balancer services and is also the default outbound path.
Application routing add-on
A managed way to get web-aware routing, certificates and DNS integration without installing and maintaining the controller yourself.
Application Gateway for Containers
An Azure-native layer 7 service that sits outside the cluster, supports modern Gateway API rules and offers web application firewall features.
Istio-based service mesh add-on
Adds identity-aware, encrypted and observable traffic between services, and can also act as an entry gateway. Choose it when you truly need mesh features.
Front Door and global entry
A global service placed in front of the cluster for worldwide routing, caching and protection against attacks, especially useful when running in more than one region.
Self-managed ingress controller
Installing a controller you choose and run yourself gives full control and full responsibility for patching and scaling it.
The Kubernetes community is moving from the older Ingress style toward the newer Gateway API, and some well-known ingress controllers have changed support status. Before committing to a design, check the current AKS documentation for which entry options are recommended today.
Public or private entry
Not every application should face the internet. Internal load balancers expose a service only on private addresses inside your network, which suits back-office tools and internal APIs. Many companies place a single, well-protected public entry point in front, with everything else kept private behind it.
Choosing an entry design
Decide who the visitors are
Public customers, internal staff or partner systems each need different protection and addressing.
Decide how smart routing must be
If you only forward ports, layer 4 is enough. If you route by website name, path or header, you need layer 7.
Decide where security checks happen
Web application firewalls, certificate handling and rate limits can sit at the global edge, at the gateway or inside the cluster.
Decide how much you want to operate
Managed options reduce chores. Self-managed options increase control. Pick consciously, not by habit.
Certificates and names
Visitors expect a secure padlock, which means a valid certificate. Letting each team handle certificates by hand leads to expired certificates at the worst moment. Automate issuance and renewal, store certificates in a central secret store, and monitor expiry dates like any other critical metric.
8Compute and Scaling: Pods, Nodes and Event-Driven Growth
Scaling happens on two levels: how many pods you run, and how many machines you have to hold them.
Two levels of scaling
Imagine a call center. Pod scaling is deciding how many agents sit at desks to answer calls. Node scaling is deciding how many desks and rooms you rent. If calls surge, you first add agents, but eventually you run out of desks and need more rooms. If you have rooms but no agents, calls go unanswered. Both levels must work together.
Scaling pods
Horizontal Pod Autoscaler
Adds or removes copies of a pod based on measured load such as processor use. It is the everyday tool for stateless web services.
Vertical Pod Autoscaler
Adjusts the size of each pod’s resource requests based on observed use. Handy for finding realistic requests for workloads that cannot easily add copies.
KEDA event-driven scaling
Scales pods from signals such as queue length, stream lag or a schedule, and can scale a workload down to zero when idle. AKS offers it as a managed add-on.
Scaling nodes: the cluster autoscaler
The cluster autoscaler watches for pods that cannot be placed because no node has room. When it finds such pods, it grows a node pool by adding machines of that pool’s size. When machines sit mostly empty for a while, it removes them. It works pool by pool, so you must have created pools with suitable machine sizes in advance.
Scaling nodes: node auto-provisioning
Node auto-provisioning, often shortened to NAP, is a newer approach built on the open-source Karpenter project. Instead of growing a fixed pool, it reads what waiting pods actually need, such as processor, memory, graphics hardware and zone, and creates machines that fit. It generally became available in mid-2025 and now also supports options like capacity reservation groups. You describe allowed machine families and rules, and the system picks sizes automatically.
flowchart TD
A["New pods cannot be placed"] --> B["Scheduler marks them pending"]
B --> C["Node auto-provisioning reads their needs"]
C --> D["Chooses machine size and zone that fit"]
D --> E["Azure creates the virtual machine"]
E --> F["Node joins the cluster"]
F --> G["Pods are placed and start running"]
G --> H["Idle or wasteful nodes are later consolidated away"]
| Question | Cluster autoscaler | Node auto-provisioning |
|---|---|---|
| Unit it grows | An existing node pool of fixed size | Individual machines chosen to fit pods |
| Machine sizes | You design pools ahead of time | Selected automatically within your rules |
| Packing efficiency | Good if pools are well designed | Usually better, with consolidation of waste |
| Setup effort | More pool planning | More rule planning, less pool planning |
| Default in Automatic | No | Yes |
The cluster autoscaler is like a taxi company that only owns cars of three fixed sizes and sends another one when a group is waiting. Node auto-provisioning is like a ride service that looks at the group, sees “two people with a lot of luggage”, and sends exactly the right vehicle.
Special hardware and savings options
Graphics hardware pools
Machine learning and rendering workloads need graphics processors. AKS supports pools with this hardware, and managed GPU support is now generally available. Taint these pools so ordinary pods do not occupy expensive machines.
Spot pools
Spot machines use spare Azure capacity at a big discount but can be taken back with short notice. They suit batch jobs, testing and workloads that tolerate interruption, not primary databases.
Capacity reservations
When a workload must always find machines available, such as a launch event, reserving capacity ahead of time removes the risk of a regional shortage.
Why requests make scaling honest
Autoscalers act on numbers. If a pod claims it needs almost nothing, the scheduler will pack too many of them on one machine and they will fight for resources. If a pod claims far more than it needs, you pay for idle capacity. Honest requests, measured from real usage, are the foundation of both performance and cost control.
Scaling pods up quickly is useless if new nodes take minutes to appear and your users are waiting right now. Keep a little spare headroom for sudden spikes, set sensible minimums, and test how fast your system truly grows under a load test.
9Storage in AKS
Pods are temporary, so anything that must survive needs a home outside the pod.
The storage vocabulary
A volume is a folder attached to a pod. A persistent volume is a piece of real storage that exists independently of any pod. A persistent volume claim is a pod’s request for storage, such as “I need 100 gigabytes of fast disk”. A storage class describes the kind of storage on offer, such as fast or cheap. Kubernetes matches claims to storage, and in AKS the matching can create Azure storage on demand.
A persistent volume claim is like booking a storage unit. You say how big it must be and how fast the access should be. The storage class is the price list. The storage unit stays yours even after you change your car.
The main Azure storage options
| Option | Behaves like | Shared by many pods | Good for |
|---|---|---|---|
| Azure Disk | A private hard drive attached to one machine | Generally no, one node at a time | Databases and single-writer workloads needing speed |
| Azure Files | A network shared folder | Yes | Shared content, configuration and legacy applications |
| Blob storage mounting | A huge object store shown as a folder | Yes | Large files, media and analytics data |
| Local temporary disk | The scratch space on the machine | No, lost with the node | Caches and temporary files only |
Zones and disks: a classic surprise
A disk lives in one availability zone. If a pod using that disk is rescheduled onto a node in a different zone, it cannot attach the disk and stays stuck. Good designs use storage classes that are aware of zones, keep nodes in every zone, and consider zone-redundant storage types for important data. Understanding this single behavior prevents many confusing stuck-pod incidents.
Stateful workloads: think before you run them in the cluster
Running a database inside Kubernetes is possible and sometimes sensible, but it adds responsibility for backups, failover, upgrades and tuning. Many teams prefer Azure’s managed database services for primary data and keep the cluster for stateless applications. If you do run stateful workloads, use stateful sets, test restores regularly, and never treat a backup as real until you have restored from it at least once.
Protect both the cluster’s configuration and the data in persistent volumes. Azure provides backup features for AKS, and keeping all cluster definitions in version control means you can rebuild the shape of the cluster quickly even if the data needs a separate restore.
10Internal Working: What Happens When You Deploy
Following one deployment from request to running pod shows how every component earns its keep.
The story of one deployment
Suppose you ask for four copies of a web application. A surprising number of steps happen in a few seconds, and each step is handled by a different component that knows nothing about the others except through the shared state store. This loose cooperation is what makes Kubernetes resilient: if one helper restarts, it simply reads the state and carries on.
sequenceDiagram
participant You as You or pipeline
participant API as API server
participant Store as State store
participant Ctl as Controllers
participant Sch as Scheduler
participant Kub as Kubelet on node
participant Run as Container runtime
You->>API: Submit deployment for four copies
API->>API: Check identity, permission and policy
API->>Store: Save desired state
Ctl->>API: Notice new deployment
Ctl->>API: Create four pod records
Sch->>API: Notice pods without a node
Sch->>API: Assign each pod to a node
Kub->>API: Notice pod assigned to my node
Kub->>Run: Pull image and start containers
Kub->>API: Report pod running and ready
Step by step in words
Admission
The API server checks who you are, whether you may do this, and whether policies allow it. Unsafe requests can be stopped here.
Recording the goal
The desired state is saved. Nothing is running yet, only the promise that four copies should exist.
Creating pods
Controllers see the gap between zero running and four wanted, and create four pod records that are not yet placed anywhere.
Scheduling
The scheduler filters out nodes that lack room or break rules, then ranks the rest and picks the best for each pod. If nothing fits, the pod waits, which is the trigger for node scaling.
Starting containers
The kubelet on the chosen node pulls the image, attaches storage, sets up networking and starts the containers.
Becoming ready
Health checks pass, the pod is marked ready, and only then does the service begin sending traffic to it.
Health checks: the three questions
Startup probe
Asks “has the application finished starting?” It gives slow starters time before other checks begin judging them.
Readiness probe
Asks “can you take visitors right now?” A pod that says no is kept out of the service but is not killed.
Liveness probe
Asks “are you stuck for good?” A pod that fails repeatedly is restarted, like rebooting a frozen computer.
Rolling updates: changing the plane while it flies
When you publish a new version, Kubernetes does not stop everything and start again. It creates a few new pods, waits until they are ready, then retires a few old ones, and repeats. At every moment enough healthy pods remain to serve users. The speed and safety of this dance are controlled by settings for how many extra pods may be created and how many may be unavailable at once.
Graceful shutdown
When a pod must stop, Kubernetes first removes it from receiving new traffic, then tells the application to finish current work, and only after a waiting period forces it to stop. Applications that ignore the polite request drop active user requests. Good applications catch the signal, finish in-flight work and exit cleanly.
Marking a pod ready the instant its process starts. If the application is still loading data, early visitors get errors. A truthful readiness check is one of the cheapest reliability upgrades you can make.
11Data Flow and Request Lifecycle
Tracing a single user click through every hop reveals where delay, failure and risk can hide.
The journey of one web request
A customer opens your site. Their request does not go straight to a pod. It passes through several layers, and each layer can add speed, protection or trouble. Knowing the path helps you place security checks, monitoring and timeouts where they matter.
flowchart LR
C["Customer browser"] --> DNS["Public DNS"]
DNS --> FD["Global edge with firewall"]
FD --> GW["Gateway or ingress"]
GW --> SVC["Service in the cluster"]
SVC --> P1["Web pod"]
P1 --> API["Internal API pod"]
API --> DB["Managed database"]
API --> Q["Message queue"]
Q --> W["Worker pod"]
North-south and east-west traffic
Traffic that enters or leaves the cluster is called north-south. Traffic between pods inside the cluster is called east-west. Most security attention goes to north-south traffic, yet in a busy microservice system the majority of requests are east-west. Network policies and service meshes are tools for watching and controlling that internal chatter.
The path of a name lookup
When one pod calls another by name, the name goes to the cluster’s DNS service, which returns the stable service address. The dataplane then picks one healthy pod behind that service and forwards the request. Because the answer is a stable address and not a pod address, pods can be replaced without callers noticing.
Where time is spent
| Hop | Typical cause of delay | What to watch |
|---|---|---|
| Edge and gateway | Certificate handling, firewall inspection, overloaded gateway | Gateway latency and error rates |
| Name lookup | Overloaded DNS, long lookup chains | DNS response times and failures |
| Pod to pod | Cross-zone hops, too many chatty calls | Service-to-service latency |
| Application | Slow code, starved processor, garbage collection | Request duration and resource saturation |
| Data layer | Slow queries, connection limits, throttling | Database waits and connection counts |
Every hop between zones adds a little time and sometimes a small cost. Keep tightly coupled services in the same zone when you can, while still spreading copies across zones for resilience. Balance speed against survival rather than optimizing only one.
The control path versus the data path
One more distinction is valuable. The control path is the route that management commands take to reach the API server. The data path is the route your users’ traffic takes to reach your pods. Because they are separate, a control plane problem does not instantly stop already running applications. Your pods keep serving users even if you temporarily cannot deploy. However, without a working control plane, the cluster cannot heal or scale, so a prolonged outage still hurts.
12Security and Identity
Good cluster security is built in layers, so that one mistake never opens the whole building.
Defense in depth
A castle was never protected by a single wall. It had a moat, an outer wall, an inner wall, guards at the gate and a locked treasury. Cluster security follows the same idea. You protect the network, the identities, the images, the workloads and the data separately, so that if one layer fails, the next still stands.
Imagine your home. You lock the front door, but you also keep valuables in a drawer, and the safe inside has its own key. A thief who picks the front lock still has more work to do. Layers buy you time to notice and react.
The layers of AKS security
Identity for people
Sign in through Microsoft Entra ID and use Azure role-based access to decide who may do what. Prefer group-based access and short-lived sessions over shared accounts.
Identity for workloads
Give each application its own identity through workload identity, so pods can reach Azure services without passwords stored anywhere.
Network boundaries
Use private clusters or restricted endpoints, network policies between pods, and firewalls for outbound traffic.
Image and supply chain
Build images from trusted bases, store them in a private registry, scan them for known weaknesses, and only allow approved images to run.
Policy and admission
Use Azure Policy and built-in safeguards to refuse risky workloads, such as ones running with too many privileges.
Runtime protection
Defender for Containers and similar tools watch for unusual behavior, like a pod suddenly launching a shell or contacting a strange address.
Secrets and data
Keep secrets in Azure Key Vault and bring them into pods through the secrets store driver rather than baking them into images or settings files.
Node hardening
Keep node images patched automatically, avoid direct login to nodes, and prefer operating systems designed to be small and locked down.
Two kinds of permission systems
Kubernetes has its own role-based access control that says which users may create or read which objects. Azure has its own, which says who may manage the cluster resource itself. AKS lets you use Azure roles for Kubernetes authorization too, so one set of groups and assignments covers both. This reduces the chance that a permission lives in one place and is forgotten in another.
Workload identity: no passwords in pods
Old designs stored a password or key in a secret so a pod could reach a database or storage account. Those secrets leak, expire and get copied. Workload identity solves this by letting the cluster issue each pod a signed identity token. Microsoft Entra ID trusts the cluster’s issuer, so it exchanges that token for a short-lived access token. Nothing long-lived is stored, and the pod can only do what that identity is allowed to do.
sequenceDiagram
participant Pod as Application pod
participant OIDC as Cluster token issuer
participant Entra as Microsoft Entra ID
participant Svc as Azure service
Pod->>OIDC: Receive signed pod identity token
Pod->>Entra: Present token and ask for access
Entra->>OIDC: Check issuer is trusted
Entra->>Pod: Return short-lived access token
Pod->>Svc: Call service with access token
Svc->>Pod: Allow only what this identity may do
A stored password is like a spare key hidden under a doormat: anyone who finds it can use it forever. Workload identity is like a hotel key card that is created for you at the desk, only opens your room, and stops working after a short time.
Policies and guardrails
Policy is a way to say “no” automatically. You can require that every workload sets resource requests, forbid containers from running as the all-powerful administrator account, block images from untrusted registries, and demand that load balancers are internal by default. Doing this in policy means the rule applies to every team every time, instead of depending on people remembering a checklist.
| Risk | Control that reduces it |
|---|---|
| Stolen cluster credentials | Entra sign-in, short-lived access, conditional access rules |
| Leaked application secrets | Workload identity and Key Vault, no secrets in images |
| Compromised pod spreading sideways | Default-deny network policies and least privilege identities |
| Vulnerable or tampered images | Private registry, scanning, approved image rules |
| Over-privileged containers | Pod security rules and policy enforcement |
| Exposed control plane | Private cluster or restricted address ranges |
| Unpatched machines | Automatic node image updates and planned upgrade windows |
Auditing and detection
Prevention is never perfect, so you must also be able to see what happened. The API server can record who did what, and those audit records can be sent to a central log store. Combine them with alerts for risky events, such as someone granting themselves broad access or a workload being created in a sensitive namespace.
Giving every developer full administrator rights to the cluster “to keep things moving”. Convenience today becomes an incident tomorrow. Grant access per namespace, per task, and for the shortest time that works.
Review who can do what at a fixed rhythm, such as once a quarter. Remove accounts of people who changed teams, and check that automation identities hold only the permissions they still need.
13Upgrades, Patching and Lifecycle
Kubernetes moves fast, so staying current is not optional. The skill is making upgrades routine and boring.
Two things that need upgrading
An AKS cluster has two separate update streams. The Kubernetes version covers the control plane and the node software, and it changes the features and behavior of the cluster. The node operating system image covers security fixes for the underlying machines. Confusing the two leads to gaps, such as a cluster whose Kubernetes version is current but whose machines have gone unpatched for months.
The support window
AKS supports each generally available Kubernetes minor version for about twelve months. New minor versions arrive a few times a year, so a cluster that is never upgraded will fall out of support. Premium tier clusters can enable long-term support for selected versions, which extends the window to roughly two years, but that is a bridge for slow organizations, not a way to avoid upgrading.
As of late October 2026, release notes describe Kubernetes 1.37 as newly available and designated for long-term support, with 1.36 as the default for new clusters. Dates shift, so always confirm against the official AKS release calendar and release tracker before planning.
Platform-initiated upgrades
Microsoft has announced that, starting in mid-2027, AKS will automatically upgrade clusters that remain on an unsupported Kubernetes version after a 60-day grace period. In plain terms, if you do not choose your upgrade moment, the platform will choose it for you. That is a strong reason to set up your own upgrade routine, maintenance windows and application readiness well before then.
Upgrade channels: choosing how automatic you want to be
| Channel style | What it does | Who it suits |
|---|---|---|
| None | You upgrade manually when you decide | Teams with strict change control and strong process |
| Patch | Applies new patch releases of your current minor version automatically | Teams wanting security fixes without feature changes |
| Stable | Moves to a well-tested earlier minor version automatically | Production clusters that value caution |
| Rapid | Moves to the newest supported version quickly | Test environments that should see changes first |
| Node image channels | Keep operating system images current separately from Kubernetes | Anyone who wants regular machine patching without manual effort |
How a rolling node upgrade works
AKS upgrades nodes gradually. It first adds a temporary extra node, called a surge node. It then picks an existing node, marks it as unavailable for new pods, and drains it by politely evicting its pods so they restart elsewhere. The empty node is rebuilt with the new version, rejoins the cluster, and the process moves to the next node. The surge setting controls how many nodes are handled at once, trading speed against risk.
flowchart TD
A["Start upgrade of a node pool"] --> B["Add surge node with new version"]
B --> C["Cordon one old node"]
C --> D["Drain pods respecting disruption budgets"]
D --> E["Rebuild node with new version"]
E --> F{"More old nodes left"}
F -->|"Yes"| C
F -->|"No"| G["Remove surge capacity and finish"]
What can stop an upgrade
Strict disruption budgets
A pod disruption budget tells Kubernetes how many copies of an application must stay up. If it is set so tightly that no pod can ever be evicted, the drain waits forever. Set budgets that protect users while still allowing movement.
Removed or changed interfaces
Each Kubernetes version retires some old interfaces. Workloads or add-ons that still depend on them can break. Read the version notes and test in a non-production cluster first.
Not enough spare capacity or quota
Surge nodes need room in your Azure quota and in the region. A near-full subscription quota can stall an upgrade halfway.
Single-copy applications
An application with only one pod will have a brief outage whenever its node drains. Run at least two copies of anything that matters.
Maintenance windows and rollback
Maintenance windows let you say when automatic upgrades may happen, such as quiet hours on weekends. A node pool rollback capability, now generally available, lets you return a node pool to an earlier version if a problem appears after an upgrade. Rollback is a comfort, but it works best when you have also tested the new version beforehand and watched dashboards during the change.
A calm upgrade routine
Read the notes
Check the release notes for breaking changes, retired interfaces and add-on version changes.
Upgrade a test cluster first
Run real tests there, including load, so surprises appear where they are cheap.
Upgrade production in the window
Watch dashboards, error rates and pod health during the process, with someone ready to pause.
Review and repeat
Note what went well or badly, then repeat on a regular rhythm so the process never becomes rare and frightening.
Skipping upgrades for a year and then jumping several versions at once. Large jumps accumulate breaking changes and are riskier. Small, frequent upgrades are safer than rare, heroic ones.
14Monitoring, Logging and Metrics
You cannot fix what you cannot see, and in a cluster that changes every minute, seeing takes deliberate design.
The signals you collect
Metrics
Numbers over time, such as processor use, memory, request counts and error rates. Cheap to store and ideal for alerts and trends.
Logs
Lines of text describing what happened. Rich in detail, but large and costly if collected without thought.
Traces
The path of a single request across many services, showing exactly where time was spent.
Events
Kubernetes records of notable moments, such as a pod being killed for lack of memory or an image failing to download.
The Azure toolbox
Azure provides managed pieces that cover these signals. Container Insights collects logs and basic health data into Log Analytics. Azure Monitor managed service for Prometheus collects metrics in the open Prometheus format without you running the storage. Azure Managed Grafana gives dashboards over those metrics. Control plane metrics collection through managed Prometheus is now generally available, so you can watch the API server itself and spot trouble such as slow or throttled requests.
flowchart LR
P["Pods and nodes"] --> M["Managed Prometheus metrics"]
P --> L["Container logs"]
CP["Control plane"] --> M
CP --> AU["Audit and diagnostic logs"]
M --> G["Managed Grafana dashboards"]
L --> LA["Log Analytics workspace"]
AU --> LA
M --> AL["Alert rules"]
LA --> AL
AL --> ON["On-call people and runbooks"]
What to measure first
| Question | Signal to watch | Why it matters |
|---|---|---|
| Are users happy | Request latency, error rate, availability | These show real user pain, not machine trivia |
| Is capacity running out | Node and pod processor and memory pressure, pending pods | Warns before scaling fails |
| Are pods healthy | Restart counts, out-of-memory kills, failed probes | Reveals crashing or starved applications |
| Is the control plane healthy | API server latency and error rates | Slow control plane means slow deploys and scaling |
| Is networking healthy | DNS failures, dropped connections, policy denials | Catches silent connectivity problems |
| Is storage healthy | Volume attach failures, disk latency, free space | Prevents data-layer surprises |
Alerting that people can live with
An alert should mean “a human must act now”. If alerts fire constantly and most are harmless, people learn to ignore them, and the one real alert gets lost in the noise. Alert on symptoms users feel, such as high error rates, rather than on every internal number. Attach each alert to a short runbook that explains what it means and what to try first.
A car dashboard does not blink every time a bolt vibrates. It shows a few lights for things that need attention, such as low fuel or engine trouble. A good alert set is that dashboard: few, meaningful and actionable.
Network visibility
When networking runs on Cilium, you can add flow visibility features that show which pods are talking to which and which connections were denied. This is very useful when a new network policy accidentally blocks a legitimate call and the application only shows a vague timeout.
Collecting every log line from every container at the most detailed level can become one of your largest bills. Decide what to keep, how long to keep it, and which noisy sources to filter before turning everything on.
15Reliability and High Availability
Reliability means the system keeps serving users even when parts of it fail, and parts always fail.
Failure domains
A failure domain is a group of things that can fail together. One pod is a failure domain. So is one node, one availability zone and one whole region. Reliable design spreads copies across failure domains so no single event removes every copy of something important.
Do not store all your savings in one wallet, and do not keep both your original and backup copy of a document on the same laptop. Spread important things across separate places so one loss does not take everything.
Building blocks of availability
Multiple replicas
Run at least two copies of anything customer-facing, and more when load or risk is higher.
Spread and anti-affinity
Ask Kubernetes to place copies on different nodes so one machine failure cannot take them all.
Availability zones
Spread node pools across zones. Automatic zone placement is now generally available, which helps spread machines for resilience.
Disruption budgets
Protect applications from too many simultaneous voluntary evictions during upgrades and maintenance.
Health-aware routing
Honest readiness checks and timeouts keep traffic away from pods that cannot serve it.
Multi-region design
Run a second cluster in another region for disaster recovery or for serving users globally.
Single region or multiple regions
flowchart TD
U["Users worldwide"] --> FD["Global traffic manager"]
FD --> R1["Region A cluster across three zones"]
FD --> R2["Region B cluster across three zones"]
R1 --> D1["Primary data store"]
R2 --> D2["Replica data store"]
D1 -.->|"replication"| D2
Advantages of multi-region
- Survives the loss of an entire region
- Users in different continents get faster responses
- Lets you drain one region for risky maintenance
- Supports data residency rules in separate locations
Disadvantages and trade-offs
- Much more complexity in data replication and consistency
- Roughly double the infrastructure cost
- More moving parts to test, monitor and keep in sync
- Failover plans that are never practiced often fail when needed
Active-active versus active-passive
| Style | How it works | Strength | Weakness |
|---|---|---|---|
| Active-active | Both regions serve users at the same time | Fast failover and better use of capacity | Hardest data design |
| Active-passive | One region serves, the other waits ready | Simpler data rules | Failover takes longer and the standby may be neglected |
| Rebuild on demand | Recreate everything from code in a new region after a disaster | Lowest ongoing cost | Longest recovery time |
Practice failure on purpose
Reliability that has never been tested is only a hope. Run drills where you remove a node, drain a zone or restore a backup, and see whether the system behaves as designed. Small, planned failures in a safe environment teach more than any document. Agree on targets for how much downtime and data loss you can tolerate, then check your design against those targets.
The uptime promise for the AKS control plane does not cover your applications. Your own design of replicas, spreading, probes and data safety decides whether users notice a failure.
16Cost Management
Kubernetes makes it easy to start resources and just as easy to forget them, so cost needs steady attention.
Where the money goes
For most clusters, the biggest cost by far is the virtual machines that make up the nodes. Next come storage, network traffic leaving Azure, load balancers, public addresses, and monitoring data. If you use the Standard or Premium tier, there is also a small fixed fee per cluster per hour. The control plane itself is not where most money disappears. Idle or oversized nodes are.
Running a cluster is like renting office space. The rent for the building matters, but the real waste comes from paying for empty desks and lights left on overnight. Cost control means matching the space you rent to the people who actually show up.
Levers you can pull
| Lever | How it saves | Watch out for |
|---|---|---|
| Honest resource requests | Packs pods tightly so fewer machines are needed | Requests set too low cause instability |
| Autoscaling and consolidation | Removes idle machines when demand falls | Scale-down speed and disruption budgets |
| Spot pools | Large discounts on interruptible work | Sudden eviction, so use only for tolerant workloads |
| Reserved capacity or savings plans | Lower price for steady, predictable usage | Commitments you cannot use |
| Stop non-production clusters | No compute charges while stopped overnight or at weekends | Restart time and dependent services |
| Right-sized machine families | Pays for the shape of resource you really need | Too many different sizes complicate operations |
| Log and metric hygiene | Cuts monitoring ingestion volume | Dropping signals you will later wish you had |
| Clean up leftovers | Removes unused disks, addresses and load balancers | Deleting something still needed |
Make cost visible to the teams who cause it
When no one can see which team’s workloads cost what, no one feels responsible for waste. Use labels on workloads and tags on Azure resources so that spending can be grouped by team, product and environment. Sharing a monthly view with each team often reduces waste more than any technical trick.
Showback
Show each team what its workloads cost, without actually charging them. It builds awareness gently and is a good first step.
Chargeback
Bill teams for what they use. It creates stronger incentives, but needs reliable tagging and agreed rules for shared costs such as the cluster’s system pods.
Optimizing cost by shrinking everything until the first traffic spike causes an outage. Save money by removing waste, not by removing safety margins that protect users.
17Design Patterns That Work
Teams that run AKS well tend to repeat a handful of patterns, at the level of the platform, the cluster and the application.
Platform-level patterns
Landing zone
Create clusters inside a pre-approved Azure environment with network, identity, policy and monitoring already decided, so every new cluster starts safe.
Hub and spoke networking
Keep shared services such as firewalls and DNS in a central network and connect each cluster’s network to it, which centralizes inspection and control.
Golden paths
Offer teams a ready, supported way to deploy, with templates that already include health checks, requests, monitoring and security.
Fleet management
When you have many clusters, manage them as a group for consistent upgrades and configuration, for example with Azure Kubernetes Fleet Manager.
Cluster layout patterns
| Layout | Isolation | Cost and effort | Best for |
|---|---|---|---|
| One cluster per environment | Good between test and production | Moderate | Most organizations as a starting point |
| Shared cluster with namespaces per team | Logical, needs strong policy and quotas | Lowest | Trusting teams under one platform group |
| Cluster per team or product | Strong | Highest, more clusters to manage | Regulated workloads or very different needs |
| Dedicated node pools for sensitive workloads | Machine-level separation inside one cluster | Moderate | Mixed sensitivity within a shared platform |
Delivery patterns
GitOps
Keep the desired state of the cluster in a version-controlled repository. An agent in the cluster, such as the Flux extension, continuously pulls and applies it. Every change is reviewed, recorded and reversible.
Blue-green releases
Run the old and new versions side by side, then switch traffic all at once when the new one looks healthy. Rollback is a quick switch back.
Canary releases
Send a small slice of real traffic to the new version first and watch the numbers. If they look good, widen the slice step by step.
Application-level patterns
Sidecar
A helper container beside the main one, handling tasks such as log shipping or traffic encryption so the main code stays simple.
Init container
A short task that runs before the application starts, such as preparing files or waiting for a dependency.
Operator
A custom controller that encodes human operating knowledge, such as how to back up and fail over a database, into automation.
Queue-based worker
Producers drop work on a queue and workers pull from it. Scaling workers on queue length smooths out spikes gracefully.
Adopt patterns when a real problem calls for them. A service mesh, a multi-region design or a fleet of clusters solves real needs, but each adds work. Start with the simplest layout that meets your security and reliability goals.
18Anti-Patterns to Avoid
These habits look harmless on day one and become expensive on day two hundred.
Problem
Every workload, including the cluster’s own helpers, runs on one shared node pool with no separation or reserved resources.
Why It’s Harmful
A single noisy application can starve the name service and other system components, so a problem in one team’s code becomes a cluster-wide slowdown. Upgrades and scaling of system parts also become entangled with application changes.
Correct Approach
Keep a small dedicated system pool for cluster components and use separate user pools, with taints where needed, for application workloads of different shapes.
Problem
Deploying pods with no resource requests, no limits and no health checks, because “it works on my machine”.
Why It’s Harmful
The scheduler cannot pack pods sensibly, autoscalers act on meaningless numbers, and broken pods keep receiving traffic. Failures show up as random slowness that is hard to trace.
Correct Approach
Measure real usage, set honest requests and sensible limits, add startup, readiness and liveness checks, and enforce these through policy so no team can skip them by accident.
Problem
Storing passwords and keys in plain settings or in container images, and giving many people full administrator rights.
Why It’s Harmful
Anyone who can read an image or a setting file can read the secret. Broad administrator access means a single stolen account can change or delete everything.
Correct Approach
Use workload identity and a central secret store, grant least-privilege access per namespace, and review permissions on a regular schedule.
Problem
Making changes by hand in the Azure portal or inside the node resource group, with no record in code.
Why It’s Harmful
The real cluster slowly drifts away from anything written down. Nobody can rebuild it reliably, reviewers cannot see what changed, and hand edits can break the managed parts of AKS.
Correct Approach
Describe infrastructure and cluster configuration in version-controlled code, apply changes through pipelines or a GitOps agent, and treat manual edits as emergencies that must be written back to code.
Problem
Leaving the cluster on one Kubernetes version for as long as possible, because upgrades feel risky.
Why It’s Harmful
The cluster eventually drops out of support, misses security fixes, and faces a big, risky multi-version jump. Platform-initiated upgrades may also pick the time for you.
Correct Approach
Upgrade in small, regular steps, test in a non-production cluster first, use maintenance windows, and let automated channels handle routine patches.
Problem
Using floating image labels such as “latest” and rebuilding images without recording what went into them.
Why It’s Harmful
Two pods of the same application can quietly run different code. Rolling back becomes guesswork because nobody can say which version was running before.
Correct Approach
Use fixed, unique image versions, keep them in a private registry, scan them, and record exactly which version each environment runs.
Problem
Treating nodes and pods like pets: logging into machines to fix things by hand and relying on files stored inside pods.
Why It’s Harmful
Nodes and pods are designed to be replaced. Hand fixes vanish at the next upgrade or scale event, and data stored only inside a pod disappears when the pod does.
Correct Approach
Treat machines and pods as disposable, fix problems in code and configuration, and keep durable data in managed storage or databases.
19Best Practices and Common Mistakes
A short, practical checklist in plain words, grouped by the topics you have just learned.
Best practices by area
| Area | Do this |
|---|---|
| Cluster setup | Choose Standard tier or Automatic for production, plan address ranges with the network team, and decide public or private access at creation time |
| Node pools | Keep a dedicated system pool, use several user pools, spread across availability zones, and taint specialized pools |
| Networking | Prefer overlay networking for new clusters, start with default-deny policies, and plan outbound paths deliberately |
| Applications | Set honest requests, add all three health checks, run at least two copies, and handle shutdown signals gracefully |
| Scaling | Combine pod autoscaling with node scaling, keep some headroom, and load-test the scale-up speed |
| Security | Use Entra sign-in, workload identity, Key Vault, policy, image scanning and least privilege access |
| Upgrades | Use upgrade channels and maintenance windows, test first, and upgrade often in small steps |
| Observability | Collect metrics and control plane metrics, alert on user-facing symptoms, and attach runbooks to alerts |
| Cost | Right-size requests, enable consolidation, use spot for tolerant work, stop non-production clusters when idle and tag everything |
| Delivery | Keep desired state in version control, use GitOps or pipelines, and release gradually with canaries or blue-green |
Common mistakes beginners and experts both make
Assuming the managed control plane means the cluster is automatically safe and highly available for applications. The platform protects the brain, not your pods.
Picking the smallest possible address ranges to save effort, then running out of room when the cluster grows or when a new network must be connected.
Running only one copy of important services and wondering why every upgrade causes a small outage.
Turning on every monitoring feature at full detail without a retention plan, then being surprised by a very large monitoring bill.
Never testing a restore or a failover. A backup or a second region that has never been used is a belief, not a protection.
If you are overwhelmed, do these in order: secure identity and access, set honest requests and health checks, enable automatic patching, add monitoring with a few meaningful alerts, then work on cost and advanced patterns. Each step makes the next one safer.
20Real-World and Industry Examples
These typical scenarios show how the ideas in this guide combine in practice. They are illustrative patterns, not descriptions of specific companies.
Online retail during a big sale
Traffic can jump many times above normal within minutes. A retailer scales pods on request load, uses node auto-provisioning to add machines quickly, reserves capacity ahead of the event, and puts a global edge service with firewall rules in front to absorb abusive traffic. Queues separate order taking from slower back-office work so a surge never blocks checkout.
Banking and financial services
Strict rules push these teams toward private clusters, all outbound traffic through an inspecting firewall, default-deny network policies, workload identity, policy enforcement and detailed audit logging. Premium or carefully managed upgrade cycles help them keep to approved versions, and multi-region designs support recovery objectives.
Streaming and media processing
Video encoding is heavy and bursty. Teams use queue-driven scaling with KEDA, spot pools for jobs that can restart, and graphics-capable pools for demanding tasks, while the viewer-facing services run on stable, zone-spread pools behind a global entry point.
Healthcare and data residency
Patient data often must stay in a specific country. Organizations deploy separate clusters per region, keep sensitive workloads on dedicated pools, protect secrets in a central vault, and prove compliance through policy reports and audit trails.
Manufacturing and device data
Factories and connected devices send steady streams of readings. Event-driven scaling sizes the processing workers to the incoming stream, and results are stored in managed data services outside the cluster so the processing layer stays disposable.
Software-as-a-service platforms
A provider hosting many customers needs isolation and fairness. Common choices include namespace-level separation with quotas and network policies for smaller customers, dedicated node pools for sensitive ones, and per-tenant cost labels so spending can be understood.
Machine learning and data science
Training jobs need graphics hardware only for a few hours. Teams run jobs on tainted GPU pools that scale up for the job and back down afterward, keep datasets in blob storage, and use scheduled jobs for regular retraining.
Internal platform for many product teams
A central platform team offers golden paths, shared monitoring, common policies and GitOps delivery. Product teams deploy through reviewed changes and see their own dashboards and costs, while the platform team handles upgrades and guardrails for everyone.
What the examples have in common
In every scenario, the winning teams treated the cluster as a product with owners, standards and a routine. They kept state outside disposable pods, they spread failure risk deliberately, they automated patching and delivery, and they measured what mattered to users. The technology differs by industry, but the habits are strikingly similar.
21Frequently Asked Questions
Plain answers to questions that newcomers and experienced engineers often ask when they first meet AKS.
Not exactly. Kubernetes is the open-source system that runs containers. AKS is Azure’s managed service that runs Kubernetes for you. You use the same Kubernetes ideas and tools, but Azure takes care of the control plane and provides links to Azure networking, identity, storage and monitoring.
It depends on the tier. The Free tier has no cluster management fee, but also no financially backed uptime guarantee. Standard and Premium add a small hourly management fee and include the uptime guarantee. In every tier you pay for the nodes, storage, networking and monitoring you use.
If your team is small and your workloads are ordinary, Automatic gives you strong defaults and removes many decisions. If you need precise control over networking, node images, upgrade timing or unusual features, Standard fits better. Review the current limitations of each mode before deciding, because features evolve.
A container is a packaged running application. A pod is the unit Kubernetes schedules, and it wraps one or a few containers that share an address and storage. Most pods hold one main container, sometimes with helper containers beside it.
Anything stored only inside the pod is lost. Data in a persistent volume or in an external database survives and can be attached to the replacement pod. That is why durable data should always live outside the pod.
Plan for regular, small upgrades rather than rare large ones. AKS supports each Kubernetes minor version for roughly twelve months, so you should upgrade at least a couple of times a year, and apply patch and node image updates continuously through automatic channels.
No. The guarantee covers the availability of the Kubernetes API server. Your application stays available only if you design it that way, with several replicas, spread across zones, honest health checks and safe data storage.
Not at the start. A mesh helps when you need encrypted, identity-aware traffic between many services, fine-grained traffic control or deep traffic visibility. For simpler systems, network policies and good monitoring are often enough, and a mesh adds operational work.
A common starting point is at least separate clusters for production and non-production. More clusters give stronger isolation but cost more effort to manage. Add clusters when you have a clear reason, such as regulation, very different workloads or regional needs, and manage them as a fleet.
Use the Free tier where an uptime guarantee is not needed, keep node pools small, use spot machines for tolerant work, and stop the cluster outside working hours. Clean up forgotten disks, addresses and load balancers regularly.
You can, but it brings responsibility for backups, failover and upgrades. Many teams keep primary databases in managed Azure database services and use the cluster for stateless applications. If you do run stateful workloads, test restores often.
Technically there are ways, but it is discouraged. Nodes are replaced during upgrades and scaling, so manual fixes disappear. Fix the cause in configuration or code, and let the platform rebuild nodes from a known good state.
No. For a single small site or a simple event-driven function, simpler Azure services can be cheaper and easier. Kubernetes shines when you have many services, need strong control over scaling and networking, or want a common platform across teams.
AKS changes quickly. The official AKS documentation, the Kubernetes version release calendar, the release tracker and the published release notes are the best sources for current features, version dates and retirements. Treat any article, including this one, as a guide to understanding rather than a replacement for those pages.
22Summary and Key Takeaways
AKS lets you run Kubernetes without running the cluster’s brain. Azure handles the control plane, while you decide how worker machines are shaped, connected, secured, scaled and updated. The service offers two operating modes and three management tiers, and its newer features such as node auto-provisioning, the overlay and Cilium networking model, workload identity and managed observability reduce the amount of plumbing teams must build. Yet the heart of success is unchanged: honest resource requests, truthful health checks, spread-out failure domains, least-privilege access, routine upgrades and clear visibility. Teams that treat the cluster as a product with a steady routine enjoy quiet, predictable operations. Teams that treat it as a one-time setup meet the same problems again and again.
Key Takeaways
- Shared responsibility — Azure runs the control plane, but your nodes, networking choices, workloads, security and data remain your responsibility.
- Mode and tier are different decisions — Automatic or Standard sets how much Azure decides for you, while Free, Standard or Premium sets the management guarantees around the control plane.
- Plan networking first — Prefer overlay networking for new clusters, avoid address overlap, use network policies, and make irreversible choices early and deliberately.
- Scale on two levels — Combine pod autoscaling and event-driven scaling with node scaling through the cluster autoscaler or node auto-provisioning, and keep requests honest.
- Layer your security — Use Entra identity, workload identity, a central secret store, policy, image scanning, private access and runtime protection together.
- Make upgrades routine — Stay inside the support window, use channels and maintenance windows, test first, and upgrade in small steps before the platform chooses for you.
- Design for failure and watch what matters — Spread replicas across nodes and zones, practice failover and restores, and alert on user-facing symptoms with a clear runbook.