All Products
Search
Document Center

Container Service for Kubernetes:Use the cost insights feature provided by ACK to manage and optimize costs

Last Updated:Mar 26, 2026

Use the cost insights feature to track and allocate IT spending across departments and applications in a cloud-native architecture. When multiple teams share a single ACK cluster, cost insights lets you break down cluster costs by namespace, label, and pod — so each business unit sees only what it consumes.

Cost insights surfaces data across three dimensions:

Dimension What you can view
Cluster Total cluster cost over a selected time range
Namespace Cost per namespace (department or team)
Application Cost per application, filtered by label

Prerequisites

Before you begin, make sure you have:

How cost allocation works

ACK calculates costs using a cost data model that distributes shared cluster resources to individual business units in three steps:

  1. Estimate pod cost: Analyze the CPU, memory, and storage resources each pod consumes.

  2. Allocate cluster cost: Distribute the total cluster cost to each pod proportionally, based on its estimated resource consumption.

  3. Aggregate business unit cost: Sum the costs of all pods belonging to a business unit within the cost governance cycle.

Key terms

Term Definition
Actual Billing cost with discount The cost you actually pay after applying subscription discounts. Use this for accurate cost chargeback.
Original bill The list price before discounts. Use this for budgeting against undiscounted rates.
Cost governance cycle The time window used for cost analysis — set to match the billing cycle of your ECS instances (monthly for subscription, daily for pay-as-you-go).

Scenario

The following example shows an enterprise with four departments running applications on a shared ACK cluster.

image
  • Applications A and B run on subscription Elastic Compute Service (ECS) instances to handle stable web traffic.

  • Applications C and D run on pay-as-you-go ECS instances to handle elastic data processing workloads.

  • Department A owns Application A.

  • Departments B and C share Application B.

  • Department D owns Applications C and D.

Manage costs using cost insights

Step 1: Determine the cost governance cycle

Set the cost governance cycle based on the billing mode of your ECS instances:

  • Subscription ECS (billing cycle: monthly or weekly) — set the governance cycle to monthly, aligned with ECS billing dates.

  • Pay-as-you-go ECS (billing cycle: hourly) — set the governance cycle to daily.

In the example scenario:

Scope ECS type Governance cycle
Cluster Mixed (subscription + pay-as-you-go) Monthly
Departments A, B, C Subscription Monthly
Department D Pay-as-you-go Daily
Application Follows the owning department Same as department

Step 2: Choose a cost estimation policy

ACK provides two policies for estimating the resource cost of each pod. Choose based on your cluster's resource usage pattern.

Policy How it works When to use
Single resource cost estimation Estimates cost using CPU or memory CPU and memory watermarks differ significantly, or most workloads use only one resource type
Weighted resource cost estimation Estimates cost using both CPU and memory, weighted by recommended or custom ratios CPU and memory watermarks are close, or workloads use both resource types

The default policy is single resource cost estimation. For a full comparison, see Cost estimation policies.

In the example scenario, most applications use only CPU resources, so single resource cost estimation applies.

Step 3: View the cluster cost

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters.

  2. Click the cluster name. In the left-side pane, choose Cost Suite > Cost Insights.

  3. On the Cluster Dimension tab, set the following filters:

    • Actual/original bill: Select Actual Billing cost with discount.

    • Time range: For example, 2024-05-01 00:00:00 to 2024-05-31 23:59:59.

  4. In the Cumulative Expenses for the Month - Actual Billing cost with discount section, view the total cluster cost for the selected period.

    查看

Cost data is available only from the date the cost insights feature was enabled. No historical data from before enablement is retained.

Step 4: View the department cost

  1. On the Cost Insights page, click the Namespace Dimension tab and set the following filters:

    • Namespace (Namespace): Select the namespace used by the department. In this example, select default.

    • Actual/original bill: Select Actual Billing cost with discount.

    • Time range: For example, 2024-05-31 00:00:00 to 2024-05-31 23:59:59. To view the daily cost for a department with fluctuating demand (like Department D), specify a single day.

  2. In the Namespace Charges - Actual Billing cost with discount section, view the department cost.

    image.png

Managed Service for Prometheus retains metric data for 15 days by default. If the specified time range extends beyond that window, the displayed cost will be lower than actual. To extend the retention period, see Change the retention period of metric data.

Step 5: View the application cost

  1. On the Cost Insights page, click the Application Dimension tab and set the following filters:

    • Namespace (Namespace): Select the namespace of the application. In this example, select default.

    • Label Pair Filter (LabelSelector): Specify the application label.

    • Time range: For example, 2024-05-31 10:00 to 2024-05-31 16:59. For applications with fluctuating daily costs (like Applications C and D), specify a time window within a day to view granular cost data.

  2. In the Application Cost section, view the application cost.

    image.png

FAQ

Why can't I find cost data from before I enabled the feature?

Cost insights starts collecting data when the feature is enabled. Data from before that point is not available.

Why is the displayed historical cost lower than the actual cost?

Managed Service for Prometheus stores metric data for 15 days by default. If your selected time range extends beyond that window, some data will be missing and the displayed cost will be lower than actual. To store data for longer than 15 days, see How do I change the storage duration of the data samples for a metric?

What's next

References