Volume 5 · Chapter 5 — Advanced .NET Cloud Native Architecture

Azure Kubernetes Service (AKS)

Goutham Mayaluri 7 min read .NETC#KubernetesAKSAzureCloud Native

5.1 Introduction

Azure Kubernetes Service is Microsoft’s managed Kubernetes: Azure operates the control plane (free) while you manage node pools and workloads, and it integrates the cluster with Azure identity, networking, monitoring, Key Vault, and Container Registry. AKS removes the hardest part of Kubernetes - running the control plane safely - while adding enterprise cloud capabilities. Volumes 8 and 11 cover AKS in production depth; this chapter frames it in the cloud-native migration story.

5.2 AKS Architecture and Node Pools

Azure manages the control plane; you manage node pools of VMs that run your pods. Node pools let different workloads run on different compute - a system pool for cluster services, a user pool for apps, and specialized or cheap Spot pools for batch work - scaling and upgrading independently.

flowchart TB
  subgraph Managed["Azure-managed Control Plane (free)"]
      API["API Server / Scheduler / etcd"]
  end
  subgraph Yours["Your Node Pools"]
      Sys["System pool"]
      App["User pool (apps)"]
      Spot["Spot pool (batch)"]
  end
  API --> Sys
  API --> App
  API --> Spot
  ACR["Azure Container Registry"] --> App

5.3 Azure Integration

AKS’s value is its Azure integration: Azure Container Registry stores signed, scanned private images; Entra ID plus Kubernetes RBAC controls access; Workload Identity lets pods authenticate to Azure services (SQL, Key Vault, Storage) with no stored secrets; VNet integration and network policies secure traffic; and Container Insights / managed Prometheus provide observability. A private cluster removes the public API endpoint.

5.4 Scaling, Security, and Delivery

AKS scales pods (HPA/KEDA) and nodes (Cluster Autoscaler), and supports multiple node pools for workload separation. Security combines Workload Identity, Key Vault via the CSI driver, network policies, private clusters, and image scanning/signing. Delivery flows through pipelines that build, scan, and push images to ACR, then roll out to AKS via readiness-gated updates or GitOps.

Senior Interview Question

Why use AKS instead of running Kubernetes yourself, and what should you still be careful about?

AKS removes the hardest and riskiest part of running Kubernetes - operating the control plane - and integrates the cluster deeply with Azure, which is why it’s preferable to self-managed Kubernetes for teams on Azure. With self-managed Kubernetes you’re responsible for the control plane’s availability, upgrades, patching, backup of etcd, and the deep expertise to run all of that safely - which is significant, ongoing, high-stakes operational work. AKS has Microsoft run and manage the control plane (API server, scheduler, etcd) at no charge for the control plane itself, handling its availability and upgrades, so you shed that burden entirely and only manage your node pools and workloads. Beyond that, AKS integrates the cluster with the Azure ecosystem in ways you’d otherwise have to build: Entra ID for authentication combined with Kubernetes RBAC, Workload Identity so pods authenticate to Azure services (Key Vault, SQL, Storage) without stored secrets, Azure Container Registry for images, VNet integration and network policies, Azure Key Vault via the CSI driver, Container Insights and managed Prometheus/Grafana for monitoring, and Cluster Autoscaler tied to Azure compute - so you get security, networking, secret management, and observability wired into Azure rather than assembled by hand. The net effect is Kubernetes’ full power with dramatically less operational toil and better native security integration, which is why for an Azure-based organization AKS is the default over self-managing. What to still be careful about: AKS manages the control plane, but you’re still responsible for a lot - node pool management and upgrades, resource requests/limits and capacity, network and security configuration (RBAC, network policies, private cluster, Workload Identity), image scanning and supply-chain security, workload health (probes, PDBs), cost management, and the operational maturity to run production Kubernetes workloads well. Kubernetes’ inherent complexity doesn’t vanish - AKS just removes the control-plane piece - so you must still have the expertise and practices to operate the cluster and workloads safely, and I’d also ask whether the workload even needs Kubernetes at all (Azure Container Apps offers serverless containers with far less operational surface for many microservices). So the answer is: use AKS to offload the control-plane operations and gain Azure integration (security, identity, networking, monitoring) while keeping Kubernetes’ capabilities, but be mindful that you still own node/workload/security/cost operations and need the maturity to run them - and consider simpler PaaS (Container Apps) when you don’t actually need full Kubernetes. Self-managing Kubernetes only makes sense when you need capabilities or portability AKS can’t provide, which is rare for Azure-based teams.

Principal Engineer Question

How do you design a production-grade, secure AKS platform for many teams?

I treat AKS as a platform product with strong, automated guardrails so teams self-serve safely rather than each hand-building clusters, and I bake in Azure integration for security and operations. On structure: I separate workloads with node pools (a system pool for cluster services, user pools for apps, and Spot pools for interruptible batch), and I isolate teams and environments with namespaces plus resource quotas and network policies, so one team can’t starve or reach into another. On security, which is paramount: a private cluster with no public API endpoint; Entra ID integrated with Kubernetes RBAC for access; Workload Identity so pods authenticate to Azure services (Key Vault, SQL, Storage) with no stored secrets - a major reduction in attack surface; Key Vault via the Secrets Store CSI driver for any unavoidable secrets; pod security standards; and image scanning and signing enforced in the pipeline with images pulled from a private Azure Container Registry. Networking uses Azure CNI for VNet integration with an ingress controller and WAF, and network policies for pod-to-pod segmentation. On scaling and reliability: HPA/KEDA scale pods (KEDA on event sources like queue depth, including to zero), the Cluster Autoscaler scales nodes, and I set sensible resource requests/limits and Pod Disruption Budgets so scaling and both app and cluster upgrades are safe and non-disruptive, with workloads spread across availability zones. On delivery: pipelines (or GitOps with Flux) build, scan, and sign images to ACR and roll them out via readiness-gated rolling updates or progressive delivery (canary), with rollback. On observability: Container Insights and managed Prometheus/Grafana plus OpenTelemetry tracing are standard, so every service is monitored. Crucially, I codify all of this as Infrastructure as Code and platform templates - onboarding a team or app means consuming a golden template that provisions a compliant namespace with quotas, policies, Workload Identity, and a pipeline - so the secure, governed configuration is the default and the easy path, not something each team must get right. I enforce non-negotiables with Azure Policy as a backstop. And I keep it operable: cluster and node upgrade strategy (respecting PDBs and surge capacity), capacity and cost management, and clear ownership between the platform team (owns the cluster, guardrails, and tooling) and application teams (own their workloads within the rails). The goal is developer self-service within automated guardrails: teams deploy onto a secure, governed, observable AKS platform quickly, while the platform team owns the security baseline, networking, upgrades, and operational standards. So a production-grade multi-team AKS platform is a private, Entra/RBAC-secured, Workload-Identity-based cluster with node-pool and namespace isolation, network policies, Key Vault integration, image scanning/signing, HPA/KEDA + Cluster Autoscaler scaling, PDBs and multi-zone reliability, pipeline/GitOps delivery, full observability, all codified as IaC golden templates with Azure Policy guardrails - which combines Kubernetes’ power with Azure’s security and operational integration, delivered as a self-service platform that scales across many teams without sacrificing security or reliability.

5.5 Banking Enterprise Scenario

A financial institution runs hundreds of .NET microservices on a private AKS platform. A system node pool hosts cluster services, user pools run payment and account services with tuned requests/limits and Pod Disruption Budgets, and a Spot pool runs overnight batch reconciliation cheaply. Workload Identity lets pods reach Key Vault and Azure SQL with no stored secrets, KEDA scales settlement consumers on Service Bus queue depth backed by the Cluster Autoscaler, and pipelines scan and sign images to ACR before readiness-gated rollouts - all provisioned from golden IaC templates with Azure Policy guardrails.

Chapter Revision Notes

  • AKS manages the control plane (free) and integrates Azure identity, networking, and monitoring.
  • Use node pools to separate system, app, and Spot/specialized workloads.
  • Integrate ACR, Entra ID + RBAC, Workload Identity (secretless), Key Vault, and Container Insights.
  • Scale pods with HPA/KEDA and nodes with the Cluster Autoscaler; use PDBs for safe upgrades.
  • Run AKS as a governed, IaC-templated, self-service platform with Azure Policy guardrails.