Skip to main content

Azure AKS

K8Cost integrates with Azure Kubernetes Service to provide cost analysis using Azure-specific pricing for Virtual Machines, Managed Disks, and networking.

Prerequisites

  • An AKS cluster running Kubernetes 1.24+
  • Metrics Server deployed (AKS includes it by default)
  • kubectl configured with access to the cluster

How Pricing Works

K8Cost maps each AKS node's VM size (e.g., Standard_D4s_v3, Standard_E8s_v5) to Azure VM pay-as-you-go pricing for the cluster's region. Pod costs are proportionally allocated based on resource requests relative to node capacity.

Supported pricing dimensions:

  • Compute: Azure VM pay-as-you-go rates by VM size and region
  • Storage: Managed Disk pricing (Standard HDD, Standard SSD, Premium SSD, Ultra Disk)
  • Network: VNet peering and internet egress estimates

Configure the agent for Azure:

kubectl set env cronjob/k8cost-analyzer -n k8cost \
K8COST_PROVIDER=azure \
K8COST_REGION=eastus

AKS-Specific Considerations

  • AKS Free tier: The AKS control plane is free for Standard tier. K8Cost reflects only the VM and storage costs.
  • Spot node pools: Nodes in Spot pools are identified via kubernetes.azure.com/scalesetpriority=spot and priced with Spot VM rates.
  • Azure Reservations: Track Reserved VM Instance coverage and utilization in the Commitments dashboard.
  • Virtual nodes (ACI): Pods scheduled on virtual nodes backed by Azure Container Instances use ACI per-second pricing.

Next Steps