AKS Cost Components
| Component | Cost | Optimization |
|---|---|---|
| AKS cluster management | Free ✅ | N/A |
| VM nodes (system + user pools) | VM pricing (largest cost) | High |
| Managed OS disks | $0.04–$0.17/GB/mo | Medium |
| Load balancers | ~$18/mo each | Consolidate |
| Egress bandwidth | $0.087/GB (first 10TB) | Architecture |
| Azure Monitor / Log Analytics | $2.30/GB ingested | Filter logs |
The free cluster management fee is AKS's biggest pricing advantage over EKS ($73/month) and GKE ($73/month). For organizations running many small clusters, this saves thousands per month.
Spot Node Pools: 60–90% Savings
AKS automatically adds the kubernetes.azure.com/scalesetpriority=spot:NoSchedule taint to Spot nodes. Add the corresponding toleration to workloads that should run on Spot, and keep system-critical workloads on the regular node pool.
Node and Pod Right-Sizing
Use Azure Advisor's AKS recommendations for node pool right-sizing. For pod-level right-sizing, deploy the Vertical Pod Autoscaler (VPA) in Recommendation mode first — it shows suggested resource requests without changing anything. After validating recommendations in staging, enable Auto mode for non-critical workloads.
Node pool sizing strategy: prefer fewer, larger nodes over many small ones. A pool of 4x Standard_D8s_v5 (8 vCPU each) runs more efficiently (better bin packing, less per-node overhead) than 8x Standard_D4s_v5 at similar cost.
KEDA: Scale to Zero for Event-Driven Workloads
KEDA (Kubernetes Event-Driven Autoscaling) enables scaling deployments to zero replicas when there's no work to do — and scaling up instantly when events arrive. For queue-processing workloads, this eliminates idle compute entirely:
Cluster Autoscaler Configuration
Enable the cluster autoscaler with aggressive scale-down settings for non-production clusters. Key settings to tune: scale-down-delay-after-add=5m (don't wait 10 minutes before scaling down), scale-down-unneeded-time=5m, and skip-nodes-with-system-pods=false for user node pools.
Cost Visibility for AKS
Azure's native AKS cost analysis is available in the Azure portal under the AKS cluster → Cost analysis (preview). It shows cost by namespace, service, and pod. For more depth: deploy Kubecost (free for single cluster) or use Azure Monitor with a custom cost allocation workbook.