Azure (AKS)
CostPilot provides real-time pricing support for Azure Kubernetes Service (AKS) clusters. Pricing data is fetched directly from Microsoft’s public prices.azure.com API, which provides the official retail pricing for all Azure VM sizes across all regions. Results are cached for 6 hours to balance freshness with API efficiency.
How pricing is fetched
When CostPilot encounters an AKS node, it queries the prices.azure.com REST API with the node’s VM size and region. The API returns the current on-demand (pay-as-you-go) price in USD.
The 6-hour cache is intentional: Azure VM prices change infrequently, and the cache significantly reduces latency on the ingestion path for high-throughput clusters. If you need to force a cache refresh — for example, after a significant pricing change — you can restart the ingester or wait for the cache to expire naturally.
Azure pricing is returned in USD regardless of the currency used on your Azure subscription. This ensures consistency with other cloud providers in CostPilot’s cost views.
Supported VM series
CostPilot supports all VM series available through the prices.azure.com API. The most commonly used AKS series are:
| Series | Optimised for | Examples |
|---|---|---|
| B-series | Burstable, dev/test | Standard_B2ms, Standard_B4ms |
| D-series v3/v4/v5 | General purpose | Standard_D4s_v3, Standard_D8s_v4 |
| E-series v3/v4/v5 | Memory optimised | Standard_E4s_v3, Standard_E16s_v5 |
| F-series | Compute optimised | Standard_F4s_v2, Standard_F8s_v2 |
| N-series (GPU) | GPU workloads | Standard_NC6s_v3, Standard_NV12s_v3 |
| L-series | Storage optimised | Standard_L8s_v2, Standard_L16s_v3 |
| M-series | Large memory | Standard_M8ms, Standard_M128ms |
| Dpsv5 (ARM) | Ampere Altra ARM | Standard_D4ps_v5, Standard_D8ps_v5 |
Because pricing is fetched dynamically from the API, CostPilot will correctly price any VM size that Microsoft makes available — including new sizes released after a CostPilot version was published.
Spot instances
AKS spot node pools are supported. Azure Spot VMs offer significant discounts — typically around 80% cheaper than equivalent pay-as-you-go pricing — in exchange for the possibility of eviction when Azure needs the capacity back.
CostPilot detects spot nodes via the kubernetes.azure.com/scalesetpriority=spot label, which AKS sets automatically on all spot node pool members. When this label is present, CostPilot fetches the spot price from prices.azure.com rather than the standard pay-as-you-go rate.
Azure Spot prices fluctuate based on demand. CostPilot records the spot price at the time of metric ingestion. For nodes that run for multiple hours, the recorded price reflects the price at each 1-minute ingestion window — which may differ slightly from the price at node creation time.
Eviction policies
Azure Spot nodes can be configured with two eviction policies:
- Deallocate — the node is stopped and deallocated (you stop paying) on eviction
- Delete — the node is deleted on eviction
CostPilot does not currently model the stop/start lifecycle of deallocated spot nodes. Cost is tracked only while the node is running and reporting metrics.
Node pool types
AKS supports several node pool configurations that affect pricing:
| Node pool type | Pricing model | Notes |
|---|---|---|
| System node pool | On-demand | Required for AKS system workloads |
| User node pool (standard) | On-demand | General workload nodes |
| User node pool (spot) | Spot | ~80% discount, evictable |
| Virtual node (ACI) | Per-second | Not currently supported |
Virtual nodes backed by Azure Container Instances (ACI) are not currently reflected in CostPilot’s pricing model. Workloads running on virtual nodes will appear as zero-cost in the cost allocation views.
CPU and memory cost split
Azure VM pricing combines CPU and memory into a single hourly rate. CostPilot applies the following default split ratios for AKS:
| VM series | CPU fraction | Memory fraction |
|---|---|---|
| B-series (burstable) | 50% | 50% |
| D-series (general purpose) | 50% | 50% |
| F-series (compute optimised) | 65% | 35% |
| E-series (memory optimised) | 35% | 65% |
| M-series (large memory) | 25% | 75% |
You can override these per cluster in Settings → Clusters → Cost configuration to match your workload characteristics.
Region support
Pricing is fetched on a per-region basis using the Azure region identifier from the node’s topology labels (e.g. topology.kubernetes.io/region=uksouth). All Azure commercial regions are supported.
Common AKS regions:
| Region | Location |
|---|---|
eastus | East US |
westeurope | West Europe (Netherlands) |
uksouth | UK South |
northeurope | North Europe (Ireland) |
australiaeast | Australia East |
southeastasia | South East Asia (Singapore) |
Tips for reducing AKS costs
- Use spot node pools for stateless and batch workloads. At ~80% cheaper, spot pools are one of the most impactful cost-reduction options available on Azure. Use CostPilot’s namespace view to identify stateless workloads that are good candidates for spot migration.
- Right-size with D-series v5. The D-series v5 generation typically offers better price-performance than v3/v4. CostPilot’s efficiency scores can help identify under-utilised nodes that could move to a smaller or newer-generation size.
- Separate system and user node pools. Running workloads on the system node pool prevents you from using spot instances there. Keep user workloads on dedicated user node pools where spot is available.
- Monitor idle cost on oversized pools. AKS autoscaler sometimes leaves nodes running longer than necessary after scale-in events. CostPilot’s idle cost tracking highlights nodes where allocated capacity consistently exceeds pod requests.