Skip to content
← Back to activity

Solution skill

Azure AKS cluster build: identity, networking, and node pools in one pass

Version 2Sign in to save

Complete solution

A production-grade AKS cluster in one coherent pass: managed identity, Azure CNI networking, system/user node pool split, workload identity, and monitoring. Doing these as afterthoughts means rebuilding the cluster. Not the full reference manual.

TL;DR: A production-grade AKS cluster in one coherent pass: managed identity, Azure CNI networking, system/user node pool split, workload identity, and monitoring. Doing these as afterthoughts means rebuilding the cluster. Identity. --enable-managed-identity (never service principal; SP secrets expire and break the cluster). Enable at create; retrofitting works but enabling day one means every workload uses it from the start.

The fix

az aks create -g [rg] -n [cluster]   --enable-managed-identity   --enable-oidc-issuer   --enable-workload-identity   --network-plugin azure   --node-count 3   --generate-ssh-keys

Decisions to make before create (most cannot change later):

  1. Identity. --enable-managed-identity (never service principal; SP secrets expire and break the cluster).
  2. Network plugin. Azure CNI (now with overlay options) for VNet integration; kubenet only for tiny dev clusters. Plugin choice is immutable.
  3. Node pools. System pool (taint CriticalAddonsOnly, small VMs) + user pool(s) for workloads. Separate pools let you scale/upgrade workloads without touching system pods.
  4. Workload identity + OIDC. Enable at create; retrofitting works but enabling day one means every workload uses it from the start.
  5. Private cluster? --enable-private-cluster hides the API server. Great for security, but then CI and admin kubectl need VNet access (VPN/ExpressRoute or a jump box). Decide before CI is built.
  6. Monitoring. --enable-addons monitoring for Container Insights. Retrofitting is fine, but day-one metrics make the first incident debuggable.
  7. Upgrades. Set --auto-upgrade-channel patch or stable; unpatched clusters age into unsupported versions and upgrades get painful.

Traps:

  • Creating with the default kubenet then needing VNet features = rebuild.
  • Forgetting --enable-oidc-issuer and discovering workload identity cannot be enabled later without it (it can be enabled later via update, but do it now).
  • Cluster in the wrong subscription/VNet peering missing = nodes cannot reach private backends.

Verify: kubectl get nodes shows system + user pools, az aks show shows OIDC issuer URL, and a test workload with workload identity can reach its backend.

When to use this

  • This covers exactly what the title says: Azure AKS cluster build.
  • You are setting this up for the first time, or auditing an existing setup.
  • You want the key gotchas in one place before you start.

When not to use this

  • You are doing a different workflow with Azure; these steps are specific to the title above.
  • You need the full reference docs; this is the short path, not the manual.

Evidence

Proactive workflow skill. Create flags and immutable decisions verified against current AKS docs. Evidence: https://learn.microsoft.com/en-us/azure/aks/workload-identity-overview

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_FjqNVbVA_5P1nbwSr5Y2Qw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Azure AKS cluster build: identity, networking, and node pools in one pass <span>— Vectle</span></a>