Edit

Share via


View Kubernetes costs

You can use the following views in Microsoft Cost Management to analyze the costs of your AKS (Azure Kubernetes Service) clusters, which are available at the subscription scope.

  • Kubernetes clusters – Shows aggregated costs of clusters in a subscription.
  • Kubernetes namespaces – Shows aggregated costs of namespaces for all clusters in a subscription.
  • Kubernetes assets – Shows costs of assets running within a cluster.

Visibility into granular costs of Kubernetes clusters helps you identify opportunities for optimization. It also enables cost allocation to different teams running their applications on shared clusters in different namespaces.

Prerequisites

  • You must enable AKS cost analysis add-on on the cluster to view its costs in these views. If you have multiple clusters running in a subscription, you must enable the add-on on every cluster. For more information on how to enable cost analysis for clusters, see Azure Kubernetes Service cost analysis.
  • Kubernetes cost views are available only for the following subscription agreement types:
    • Enterprise Agreement
    • Microsoft Customer Agreement
      Other agreement types aren't supported.
  • You must have one of the following roles on the subscription hosting the cluster.
    • Owner
    • Contributor
    • Reader
    • Cost management reader
    • Cost management contributor

Access Kubernetes cost views

Use any of the following ways to access the Kubernetes cost views.

View from the Subscription page

To access Kubernetes cost views from the Subscription page:

  1. Sign in to Azure portal and navigate to Subscriptions.
  2. Search for the subscription hosting your clusters and select it.
  3. In the left navigation menu under Cost Management, select Cost analysis.
  4. In the View list, select the list drop-down item and then select Kubernetes clusters.
    Screenshot showing the Kubernetes clusters view.

View from the Cost Management page

To access Kubernetes cost views from the Cost Management page:

  1. Sign in to Azure portal and search for Cost analysis.
  2. Verify that you are at the correct scope. If necessary, select change to select the correct subscription scope that hosts your Kubernetes clusters.
    Screenshot showing the scope change item.
  3. Select the All views tab, then under Customizable views, select a view under Kubernetes views.
    Screenshot showing the Kubernetes views items.

Kubernetes clusters view

The Kubernetes clusters view shows the costs of all clusters in a subscription. With this view, you can drill down into namespaces or assets for a cluster. Select the ellipsis ( ) to see the other views.

Screenshot showing the ellipsis item to show more views.

Kubernetes namespaces view

The Kubernetes namespaces view shows the costs of namespaces for the cluster along with Idle and System charges. Service charges, which represent the charges for Uptime SLA, are also shown.

Screenshot showing the Kubernetes namespaces view.

Kubernetes assets view

The Kubernetes assets view shows the costs of assets in a cluster categorized under one of the service categories: Compute, Networking, and Storage. The uptime SLA charges are under the Service category.

Screenshot showing the Kubernetes assets view.

View amortized costs

By default, all Kubernetes views show actual costs. You can view amortized costs by selecting Customize at the top of the view and then select Amortize reservation and savings plan purchases.

Screenshot showing the amortize display option.

Next steps

To learn more about optimizing AKS costs, see Best practices for cost optimization in Azure Kubernetes Service (AKS)