# Azure Kubernetes Service Cluster

> AKS spend is dominated by agent-node VMs that bill while allocated, so ZopNight offers two levers: the native cluster Stop/Start operation, which deallocates every agent node while preserving cluster state, and namespace-level scheduling driven by 43 AKS workload rules across 29 discovered workload types.

Source: https://zop.dev/integrations/azure/aks-cluster
Updated: 2026-08-19

---

Azure Kubernetes Service is Azure's managed Kubernetes offering, running containerized workloads on pools of agent-node VMs. Non-production clusters that run 24/7 typically waste well over half of their node spend outside working hours.

## Node VMs are the bill, not the control plane

An AKS cluster's cost is overwhelmingly the agent nodes: ordinary Azure VMs that bill for allocated compute hour after hour, plus their managed disks and any load balancers and public IPs the cluster provisions. Kubernetes itself never appears as a large line item. The node pools do. That means every idle-cluster question reduces to a familiar one: how many VMs are allocated right now, and does anything need them?

## Two scheduling levers: cluster stop and namespace scaling

At the cluster level, ZopNight uses the native AKS Stop/Start operation, which deallocates all agent nodes while preserving cluster state: workloads, config, and IPs come back when the cluster starts. Inside a running cluster, namespace-level scheduling scales Deployments, StatefulSets, DaemonSets and CronJobs down and back, managing HPAs and PDBs so controllers do not fight the schedule. Reserved system namespaces are excluded. The first lever suits clusters nobody touches at night; the second suits shared clusters where only some teams go home.

## How ZopNight reads an AKS cluster

The cluster is found through Azure Resource Graph, then explored through the Kubernetes layer: 29 aks-* workload types are discovered per cluster, and 43 AKS workload recommendation rules evaluate them. Azure Monitor metrics with a 60-day lookback and Cost Management billing complete the cost picture. Kubernetes-layer access requires the generated Zopnight AKS Access custom role, which carries 55 actions.

## AKS waste that survives a cluster autoscaler

The autoscaler removes empty nodes, not idle workloads. A dev Deployment requesting 4 CPUs holds its nodes all weekend even at zero traffic. Common leaks: replicas sized for launch day still running months later, CronJob test namespaces nobody deleted, and clusters where every environment shares one pool so nothing can ever scale to zero.

## Portal location for AKS clusters

Azure portal → Kubernetes services lists every cluster; a cluster's Overview shows its power state, and Settings → Node pools shows the per-pool node counts that actually drive the bill.
