The cost insights feature of Container Service for Kubernetes (ACK) helps IT administrators of enterprises analyze the usage and cost allocation of resources in ACK clusters and provides suggestions on cost savings to improve the overall resource utilization. After you enable the cost insights feature, you can gain insights into the cost and resource usage of a specified cluster, department, or application within a specified financial governance cycle. This meets the requirements for cost estimation, allocation, and accounting in various scenarios.
Prerequisites
You have connected Alibaba Cloud ACK to Cloud Monitor 2.0.
Purpose of cost insights
Large numbers of enterprises use cloud-native technologies for IT transformation in which cost optimization is an important objective. You can use the sharing, isolation, and scaling capabilities of cloud-native technologies to optimize the costs of resources. Compared with the traditional capacity planning method that is used to manage IT spending, cloud-native technologies pose greater challenges. The following section describes these challenges:
How to accurately calculate the cost of an ACK cluster?
How to accurately estimate the cost of a pod?
How to accurately estimate the cost of an online application or a CronJob?
How to use namespaces to allocate the cost of ACK cluster management by department?
How to identify and optimize cost waste in a cluster in a visualized manner?
Figure 1. Resource utilizations of different types of clusters
To address the preceding challenges, ACK provides the cost insights feature. The cost insights feature is an important part of Finance+DevOps (FinOps) and plays an important role throughout the entire cost governance procedure. For example, you can use this feature to monitor the daily cost trend, analyze cost issues, and evaluate cost optimization measures.
Dimensions of the Cost Insights dashboard

Dimension | Description |
CS Cost Overview | Provides insights into the overall resources and costs of a cluster, reflecting the health of your cluster costs. For any cluster, first check the overall cost trend to see if it meets your expectations. If the trend is abnormal, use the dashboard data to find the root cause. |
CS Cost Namespace | If your company uses namespaces to separate departments or services, you can filter by namespace to view resource and cost information for a specific one. |
CS Cost Node Pool | Provides cost insights from a cluster resource perspective. Computing resources, mainly ECS instances, are often the largest part of cluster costs. O&M engineers manage these resources directly. The node pool cost insights provide analysis of node pool resource usage and help you choose a billing strategy. |
CS Cost Application | Focuses on scenario-based cost optimization. Use a label selector (a label with a wildcard character) to filter for specific applications and collect cost and resource statistics. With a label selector, you can monitor the cost and resource usage of a single application or multiple related applications. For example, in a big data workflow, you can add the same label to all applications in the pipeline. This lets you analyze the cost of the entire workflow. |
Access the feature
Log on to the Cloud Monitor 2.0 console, and select a workspace. In the left navigation pane, choose .
In the navigation bar of CloudLens for Container, choose .
On the dashboard page, click the tabs to view the cost visualization dashboards.
CS Cost Overview
CS Cost Namespace
CS Cost Node Pool
CS Cost Application
CS Cost Overview: Cluster cost analysis
Filter dimensions
Parameter | Description |
Cluster billable cost | The cluster cost metric options. You can view statistics for the actual billable cost after discounts or the list price billable cost.
For more information about payable amounts and list prices, see Billing details (offline and redirected). Note Cost statistics for some applications in the cluster, such as those at the namespace and pod levels, are calculated based only on the list price billable cost. |
Cost allocation model | The cost allocation model options. You can choose a single-resource model or a weighted hybrid-resource model. The models are as follows:
For more information about choosing a cost allocation model, see Cost estimation strategies. |
Time range | Select a time range for the dashboard. You can set this parameter to view cost and resource trends over different time ranges. |
Cluster cost overview
Metric | Description |
| The data displayed here depends on the Cost Allocation Model that you select. By default, the dashboard uses the CPU Model, which estimates pod costs based on CPU resource requests. |
| These are cost statistics. Yesterday's cluster cost, day-over-day cost change, cumulative cost this week, and cumulative cost this month are the billable costs of the cloud resources in this cluster. Cumulative cost this week and cumulative cost this month are the billable costs for the calendar week and calendar month, respectively. Because bills are generated with a T+1 latency, the cumulative cost for the week is not displayed on Mondays, and the cumulative cost for the month is not displayed on the first day of the month. The day-over-day cost change is the change in yesterday's cluster cost compared to the day before:
|
Cluster cost & capacity trend chart | This is a trend chart of cluster cost and capacity. The yellow curve represents the cost, and the blue curve represents the actual cluster capacity. Typically, the two curves are correlated. You can compare the correlation between the two curves. If you find that their trends are inconsistent, an anomaly may exist in the cluster's unit core cost. In this case, check for resources with excessively high costs. |
|
Note
|
Stability & efficiency analysis
Metric | Description |
| Shows the number of pods for each Quality of Service (QoS) class in the cluster and the total resource usage. |
Cluster pod resource utilization analysis | This provides basic information and resource utilization (Usage/Request) for all pods in the cluster. It also supports filtering and sorting. You can use this feature to view the workloads with the highest or lowest resource usage in the cluster. |
Burstable Pod - Resource usage analysis | You can view the resource configuration of Burstable QoS class pods. Filtering and sorting are supported. You can use this feature to view the request and limit settings for resources such as CPU and memory for each Burstable pod. This helps you understand the cluster resources that the pod consumes and identify potential resource bottlenecks. |
Best Effort Pod - Resource usage analysis | You can view the resource configuration of BestEffort QoS class pods. These pods generally have higher stability risks. You can filter and sort the list to check for any unexpected BestEffort pods and address them promptly to mitigate risks. |
For more information about the Stability & Efficiency Analysis feature, see Use Cost Insights to identify cluster resource risks.
Cluster cost analysis
Metric | Description |
| A cluster can contain multiple cloud products. Different cloud products have different usage methods and billing models, which can lead to variations in costs. You can view the consumption of different cloud products through cost trends and combinations to make cost-related decisions. |
Actual cost trend (by cluster) | Statistics on the daily total cost trend of the cluster. |
Actual cost trend (by node pool) | Analysis of the node billable costs for each node pool or virtual node in the cluster. |
Cost estimation analysis (by namespace) - List price billable cost |
|
Cluster computing resource request & utilization trend chart | Scenarios:
Trend chart description:
Allocated but unused application resources = Green column chart - Yellow column chart Remaining allocatable cluster resources = y-axis - Green column chart Analysis flow:
|
| A list of daily bills for the cluster, broken down by cloud product and cloud product instance. |
CS Cost Namespace: Namespace cost analysis
The namespace dashboard lets you filter and display resource and cost information for each namespace. Namespaces often correspond to departments or teams in a company.
Filter dimensions
Parameter | Description |
Namespace | Select the namespace of the cluster to analyze. The default is ALL, which means the entire cluster. |
Cost allocation model | The cost allocation model options. You can choose a single-resource model or a weighted hybrid-resource model. The models are as follows:
For more information about choosing a cost allocation model, see Cost estimation strategies. |
Actual/List price bill | The cluster cost metric options. You can view statistics for the actual billable cost after discounts or the list price billable cost.
For more information about payable amounts and list prices, see Billing details (offline and redirected). |
Time range | Select a time range for the dashboard. The default is the last 7 days. You can set this parameter to view cost and resource trends over different time ranges. |
Cost overview
Metric | Description |
| You can use the CPU and memory metrics to determine resource waste in a namespace. The metrics are as follows:
|
Real-time namespace cost estimation | The real-time estimated cost of the namespace, which is the sum of the estimated costs of all pods within it. |
Namespace cost allocation | The allocated cost for the namespace. This is the portion of the cluster's actual cost allocated to the namespace based on its estimated cost proportion. |
Cost details and trends
Metric | Description |
Unit price per core-hour | Trend statistics for the price per CPU core per hour of the nodes where the pods are located. |
CPU/Memory resource utilization trend | Trend statistics for CPU and memory resource utilization in the namespace. |
| The trend of resource allocation and actual consumption. The blue curve represents allocated resources, and the red curve represents actually consumed resources. When a pod is scheduled, the node pre-allocates a certain amount of resources for it. However, the resources actually consumed by the container process are usually different from the pre-allocated resources. This chart reflects the relationship between the two, which helps you optimize wasted resources. |
|
|
Pod resource request ranking | Statistical analysis of applications with high pod resource requests in the cluster, used for scenarios such as capacity planning. |
Pod resource utilization ranking - Sorted by CPU utilization | You can view pod application replicas with low resource utilization to help you identify idle applications. |
Pod idle resource ranking |
|
CS Cost Node Pool: Node pool cost analysis
The node pool dashboard provides cost insights from a cluster resource perspective. It helps you analyze node pool resource usage and choose a billing strategy.
The node pool dashboard focuses on the resource dimension, which allows for resource cost planning and administration from the perspective of different node pools. For example, resources such as GPU node pools may belong to multiple departments, which makes it difficult to analyze costs by namespace. With the node pool dashboard, you can directly set policies and optimize costs from the resource dimension.
Filter dimensions
Parameter | Description |
Actual/List price bill | The cluster cost metric options. You can view statistics for the actual billable cost after discounts or the list price billable cost.
For more information about payable amounts and list prices, see Billing details (offline and redirected). |
NodePoolID | Select the node pool of the cluster to analyze. The default is All, which means all node pools. |
Time range | Select a time range for the dashboard. The default is the last 7 days. You can set this parameter to view cost and resource trends over different time ranges. |
Cost overview
Metric | Description |
|
|
Unit price per core-hour for the cluster | The trend of changes in the unit price per core-hour for nodes in the node pool over a period of time. |
| The trend of cost changes for nodes in the node pool, and the trend of the proportion of these node costs to the total cluster cost. |
Billing strategies and cost estimation
Metric | Description |
| Analysis of the proportion and trend of node instances with different billing strategies over a period of time, along with the analysis of the cost proportion and trend of nodes with different billing strategies in the node pool. The following billing strategies are supported:
|
| Cost savings prediction analysis for changing node billing strategies. This analyzes the potential savings or extra costs if all nodes in the current cluster's node pool are switched to different billing strategies, which helps you optimize your resource mix and billing strategies. |
Hourly cost/billing strategy statistics for nodes - List price billable cost | Statistics on the cost and billing strategies for all nodes in the node pool. |
CS Cost Application: Application cost analysis
The application dashboard uses label wildcard matching to filter applications that you follow. It provides cost and resource statistics for scenario-based cost optimization. Typical scenarios include big data services, AI services, and elastic services.
Using label wildcard matching, you can monitor the cost and resource usage of a single application or multiple related applications. For example, in a big data workflow scenario, you can add a consistent label to all applications in the pipeline to analyze the cost of the entire workflow.
Filter dimensions
Parameter | Description |
Namespace | The cluster cost metric options. You can view statistics for the actual billable cost after discounts or the list price billable cost.
For more information about payable amounts and list prices, see Billing details (offline and redirected). |
Namespace | Select the namespace of the cluster to analyze. The default is All, which means all namespaces. |
Workload type | The object type of the cluster resource. |
Workload name | Based on the resource object type, select the workload name. |
Filter by label pair (LabelSelector) | Enter the label of the application pod. You can use If the label key contains needs to be converted to:
|
Cost allocation model | The cost allocation model options. You can choose a single-resource model or a weighted hybrid-resource model. The models are as follows:
For more information about choosing a cost allocation model, see Cost estimation strategies. |
Time range | Select a time range for the dashboard. The default is the last 7 days. You can set this parameter to view cost and resource trends over different time ranges. |
Cost overview
Metric | Description |
Application cost | The cost of the currently selected application for the time range queried on the dashboard, calculated based on the list price billable cost. |
Current number of application replicas | Statistical analysis of the peak and trough values of the pod replica count for the application. |
Application resource utilization in the entire cluster/namespace | The resource proportion of the application in the cluster and namespace. |
Hourly cost of the node where the application runs | The unit price per core-hour for each node where the application is running. |
Application runtime / Total consumed core-hours | Statistics based on the application's runtime. The total number of core-hours consumed by the application. |
Computing resource utilization | The utilization rate of CPU and memory (Usage / Request). |
Pod-level application cost analysis | You can view the resource status and real-time estimated cost of each pod that is contained in the application. |
Application estimated cost trend | The trend of changes in the application's hourly cost and unit price per core-hour over a period of time. |
Application pod scale trend | Trend statistics for the number of pod replicas for the application. |
| Description of the CPU, memory, and GPU request and usage trend charts:
Allocated but unused application resources = Blue column chart - Yellow column chart Remaining allocatable cluster resources = y-axis - Blue column chart Waste analysis flow:
|
Billing strategies and pod usage
Metric | Description |
| Analyzes the potential savings or extra costs if all nodes in the current application are switched to different billing strategies, which helps you optimize your resource mix and billing strategies. |
| Includes billing strategy statistics for nodes where the application runs, and hourly cost and billing strategy statistics for those nodes. This is used to analyze the distribution and trends of different billing strategies for the nodes where the application is running. |
| You can analyze departmental cost consumption through cost analysis to help you identify applications with high idle rates. The metrics are as follows:
|
FAQ
Why is no data displayed after I enable cost visualization?
You can check whether a NAT Gateway is configured for the cluster. Some regions do not support querying bills through internal endpoints. Make sure that your cluster can access the Internet.
The Day-over-day cost change and Tomorrow's predicted cost metrics are displayed only after cost data has been collected for two consecutive days.
Why does the sum of namespace costs not equal the actual bill?
Namespace costs are calculated based on cost estimation, not directly from bill analysis. Therefore, cost estimation is based on the list price. When the cluster cost includes deductions from coupons, discounts, or savings plans, data drift may occur. However, you can allocate costs by multiplying the total cluster cost by the cost percentage of each namespace.
Why don't the bills show all the cloud products that the cluster uses?
Cost analysis includes statistics only for cloud products that are exclusively used by the current cluster. Cloud products shared by multiple clusters are not included in the bill statistics for cost analysis.
The Cost Insights feature relies on the cost allocation tags feature in the Expenses and Costs console. It uses a specific tag (key:value=ack.aliyun.com:{{ClusterId}}) to track and collect cluster costs. If you disable this tag on the Cost Allocation Tags page, cluster-level cost statistics will become unavailable. To resolve this issue, you must re-enable the ack.aliyun.com and ack.alibabacloud.com/nodepool-id tags.
Why is the cumulative cost for this month or week lower than the actual cost?
The system starts to collect cost data only after the Cost Insights component is enabled for the cluster. Data generated before the component was enabled is not included.