Check AKS cost allocation before cutting capacity
On this page
Avoid cutting needed capacity: match AKS cost allocation with resource metrics for the same cluster or namespace and dates before proposing changes. Allocated cost alone does not show that node capacity or pod resource requests can be reduced safely.
What you need first
- Tool
- AKS cost analysis displays allocated costs in the Azure portal. Start at the subscription's Cost Management > Cost analysis view. Azure Managed Grafana displays metric dashboards; start in the Managed Prometheus folder of the instance linked to your Azure Monitor workspace.
- Access
- Cost Management Reader on the subscription hosting the cluster is one supported role for viewing cost analysis. Ask an authorized monitoring colleague to provide the matching read-only Grafana results if you cannot open the dashboards.
- If you do not use that tool
- Ask the subscription cost owner and AKS monitoring owner to complete the checklist. Give them the subscription, cluster, optional namespace, and start and end dates. Request cost allocation and metric results with scope, units, time range, and aggregation.
Why this is worth a look
An allocation difference can be mistaken for unused capacity. Azure Kubernetes Service (AKS) cost analysis reconciles usage with invoice data and allocates costs to clusters, namespaces, and Compute, Network, and Storage resources. Prometheus stores time-series metrics. Use both views to choose what needs investigation, not to approve a capacity cut.
Run this check
CHECKLISTComplete this checklist in existing Azure portal and linked Managed Grafana views, or give it to the authorized owners. Review one cluster, optionally one namespace, over a shared start and end date. Record currency separately from resource units.
1. Confirm readiness with the cluster owner. Do not change settings.
[ ] Cost analysis is enabled on a Standard or Premium AKS cluster under an Enterprise Agreement or Microsoft Customer Agreement offer, without virtual nodes.
[ ] The cluster has managed identity, the Azure Disk Container Storage Interface (CSI) driver, and access to the Azure API including Azure Resource Manager.
[ ] Prometheus is collecting cluster metrics into an Azure Monitor workspace linked to Azure Managed Grafana.
[ ] If cost analysis was just enabled, allow up to 24 hours for collection.
2. Record allocated cost.
[ ] In the Azure portal, open the subscription hosting the cluster > Cost Management > Cost analysis.
[ ] In View, select the list drop-down item, then Kubernetes clusters.
[ ] Record subscription, cluster, start and end dates, allocated cost, and displayed currency. For a namespace review, request that namespace's allocation from the cost owner.
3. Record matching resource metrics.
[ ] In linked Azure Managed Grafana, open Managed Prometheus > Kubernetes / Compute Resources / Cluster, or Kubernetes / Compute Resources / Namespace (Pods).
[ ] Match the cluster, namespace if used, and review dates to the cost record.
[ ] Record each relevant panel's metric or recording rule, unit, and aggregation. Verify which measures show usage, requests, or capacity rather than inferring this from the dashboard name.
4. Choose the next action.
[ ] If scopes differ, data is missing, or required measures are absent, request a corrected result before drawing a conclusion.
[ ] Compare resource measures only with compatible units and aggregations. Do not compare currency numerically with resource units.
[ ] Send aligned results and the specific capacity question to the workload owner for review. Do not resize resources during this checklist.How to confirm it
- 01
Set the review boundary
Choose one cluster, optionally one namespace, and a start and end date. Have the cluster owner confirm readiness using the checklist. Keep this review read-only.
- 02
Capture the cost allocation
Record the allocated cost and currency from the Kubernetes clusters view using the checklist route. Ask the cost owner for namespace allocation if the investigation is narrower than a cluster.
- 03
Check what the metrics measure
Read the matching Grafana panels and record their units and aggregation. Stop if the measures needed to assess usage, requests, or capacity are absent; a dashboard name is not enough.
- 04
Request a capacity review, not a cut
Send the aligned results to the workload owner with a specific question about node capacity or pod resource requests. Resolve scope mismatches and collection gaps before treating the results as evidence of unused resources.
Before making changes
Do not treat missing metrics as idle capacity. This review assumes cost analysis is already enabled and Prometheus collection and linked Grafana are working; it is not a setup procedure. Node updates can cause one- to two-minute gaps in some cluster-level metric collections. The comparison identifies a review candidate, not a safe reduction amount.