As an IT cost manager, enable the cost insights feature in ACK to gain multi-dimensional insights into cluster resource usage and cost distribution, receive cost-saving recommendations, and improve resource utilization. After you enable this feature, you can view the cost and resource usage of specific clusters, departments, and applications within a specified financial period. This helps you perform cost estimation, cost allocation, and cost accounting for various scenarios.
Prerequisites
You have integrated Container Service for Kubernetes (ACK) with CloudMonitor 2.0.
Why use cost insights
Many enterprises are adopting cloud-native technologies as part of their digital transformation, making IT cost optimization a primary goal. The sharing, isolation, and auto scaling capabilities of cloud-native technologies make it easy to optimize costs. However, managing IT costs in a cloud-native environment is more challenging than traditional capacity planning. Common questions include:
-
How can I accurately calculate the cost of an ACK cluster?
-
How can I more accurately estimate the cost of a pod?
-
How can I more accurately estimate the cost of an online application or a CronJob?
-
How can I allocate ACK cluster management costs by namespace for different departments?
-
How can I visually identify and optimize cost waste in a cluster?
Figure 1. Resource utilization of different cluster types
ACK provides the cost insights feature to address these challenges. Cost insights is a critical component of FinOps (Finance + DevOps), a practice for managing and optimizing cloud costs. This feature supports the entire cost governance lifecycle, including daily cost trend monitoring, root cause analysis for cost anomalies, and evaluation of the effectiveness of optimization measures.
Cost insights dashboard dimensions
|
Dimension |
Description |
|
CS Cost Overview |
Displays overall resource usage and costs for a cluster, helping you monitor its financial health. Start by checking the cost trend to see if it meets expectations. If the trend is unusual, use the dashboard data to investigate the root cause. |
|
CS Cost Namespace |
Filter by namespace to view resource and cost details for a specific department or business unit. |
|
CS Cost Node Pool |
Offers a resource-centric view of costs. Because compute resources (primarily ECS) often dominate cluster costs, this dimension helps you analyze node pool usage and select an optimal billing strategy. |
|
CS Cost Application |
Focuses on scenario-based cost optimization. Use label selectors to filter specific applications and aggregate their cost and resource statistics. You can monitor individual applications or groups of related applications. For example, in a big data workflow, you can apply the same label to all applications in the pipeline to 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 CloudLens for Container navigation bar, choose CloudLens > Cost Insights.
-
On the visualization dashboard, click the tabs to view the cost 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 metric for calculating cluster costs. The available options are:
For more information about payable amounts and list prices, see Billing details (offline and redirected). Note
Costs for application-level resources, such as namespaces and Pods, are always calculated based on the list price billable cost. |
|
Cost allocation model |
Specifies the model for allocating costs. You can choose a single-resource model or a weighted hybrid model. The following models are available:
For more information about choosing a cost allocation model, see Cost estimation strategies. |
|
Time range |
Select a time range for the dashboard to view cost and resource trends over different periods. |
Cluster cost overview
|
Metric |
Description |
|
Varies based on the selected cost allocation model. By default, the dashboard uses the CPU model, which estimates Pod costs based on CPU resource requests. |
|
Cost statistics for the cluster. Yesterday's cluster cost, day-over-day cost change, cumulative cost this week, and cumulative cost this month represent the billable costs of cloud resources in this cluster. Cumulative cost this week and Cumulative cost this month show costs for the calendar week and month, respectively. Due to a one-day (T+1) delay in billing data generation, the weekly cumulative cost is not displayed on Mondays, and the monthly cumulative cost is not displayed on the first day of the month. Day-over-day cost change shows the percentage change in yesterday's cluster cost compared to the day before:
|
|
Cluster cost and capacity trend chart |
This chart shows trends in cluster cost and capacity. The yellow curve represents cost, and the blue curve represents actual cluster capacity. Typically, the two curves are correlated. Inconsistent trends between the two curves may indicate an anomaly in the cluster's cost per core. Check for resources with unusually high costs. |
|
Note
|
Stability and efficiency analysis
|
Metric |
Description |
|
Shows the number of Pods for each QoS class in the cluster and their total resource usage. |
|
Cluster Pod resource utilization analysis |
Provides basic information and resource utilization (Usage/request) for all Pods in the cluster. You can filter and sort this data to identify workloads with the highest or lowest resource usage. |
|
Burstable Pod - resource usage analysis |
View the resource configuration of Burstable Pods. You can filter and sort the list to check the resource request and limit for each Burstable Pod, helping you understand resource consumption and identify potential bottlenecks. |
|
BestEffort Pod - resource usage analysis |
View the resource configuration of BestEffort 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 to mitigate risks. |
For more information about the Stability and efficiency analysis feature, see Use Cost Insights to identify cluster resource risks.
Detailed cost analysis
|
Metric |
Description |
|
A cluster can contain multiple cloud products with different usage patterns and billing models, leading to cost variations. You can analyze cost trends and combinations for different cloud products to make informed spending decisions. |
|
Actual cost trend (by cluster) |
A trend of the cluster's total daily cost. |
|
Actual cost trend (by node pool) |
An analysis of the 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 and utilization trend chart |
Use cases:
Chart description:
Allocated but unused application resources = Green bars - Yellow bars Remaining allocatable cluster resources = y-axis - Green bars Analysis workflow:
|
|
A list of daily bills for the cluster, broken down by cloud product and by instance. |
Namespace cost analysis
Filter and view resource and cost information by namespace, which often corresponds to departments or teams within your organization.
Filter dimensions
|
Parameter |
Description |
|
Namespace |
Select the namespace of the cluster to analyze. The default is ALL, which represents the entire cluster. |
|
Cost allocation model |
The model for allocating costs. You can choose a single-resource model or a weighted hybrid-resource model. The following models are available:
For more information about choosing a cost allocation model, see Cost estimation strategies. |
|
Actual/list price bill |
The metric for calculating cluster costs. The available options are:
For more information about payable amount and list price, see Billing details (offline and redirected). |
|
Time range |
Select a time range for the dashboard. The default is the last 7 days. |
Cost overview
|
Metric |
Description |
|
These metrics help identify resource waste within a namespace.
|
|
Real-time namespace cost estimation |
The sum of the estimated costs for all Pods within the namespace. |
|
Namespace cost allocation |
The portion of the cluster's actual cost allocated to the namespace based on its estimated cost ratio. |
Cost details and trends
|
Metric |
Description |
|
Unit price per core-hour |
Shows the trend of the unit price per core-hour for the nodes that host the Pods. |
|
CPU/memory resource utilization trend |
A trend of the CPU and memory resource utilization within the namespace. |
|
Shows the trend of allocated resources versus actual consumption. The blue curve represents allocated resources, and the red curve represents consumed resources. When a Pod is scheduled, its node pre-allocates resources. However, the resources actually consumed by the container process often differ. Analyzing the gap between allocated and consumed resources helps you optimize resource usage and reduce waste. |
|
|
|
Pod resource requests ranking |
Ranks applications by their Pod resource requests to assist with capacity planning. |
|
Pod resource utilization ranking - sorted by CPU utilization |
Identifies Pod replicas with low resource utilization, helping you find idle applications. |
|
Pod idle resource ranking |
|
CS Cost Node Pool: Node pool cost analysis
-
Analyze node pool usage and choose an optimal billing strategy with resource-centric cost insights.
-
Plan and govern costs for individual node pools. For example, specialized resources such as GPU node pools might be shared across multiple departments, making namespace-level cost analysis difficult. The node pool view lets you set policies and optimize costs directly at the resource level.
Filter dimensions
|
Parameter |
Description |
|
Cost metric |
Sets the metric for cluster cost analysis:
For more information about payable amount and list price, see Billing details. |
|
NodePoolID |
Selects the node pool to analyze. The default is All. |
|
Time range |
Selects a time range for the dashboard, with a default of the last 7 days. This allows you to view cost and resource trends over different periods. |
Cost overview
|
Metric |
Description |
|
|
|
Cluster price per core-hour |
Displays the price per core-hour trend for nodes in the node pool. |
|
Displays the cost trend for nodes in the node pool and their cost as a percentage of the total cluster cost. |
Billing strategy and cost estimation
|
Metric |
Description |
|
Shows the proportion and trend of node instances and their costs across billing strategies. The supported strategies are:
|
|
Analyzes potential cost savings from changing billing strategies by predicting the impact if all nodes used a single billing method. Use this data to optimize your resource mix. |
|
Hourly node cost/billing strategy statistics - list price |
Displays hourly cost and billing strategy statistics for all nodes in the node pool. |
CS Cost Application: Application cost analysis
-
Filter for specific applications using label wildcard matching to collect cost and resource statistics. Focuses on scenario-based cost optimization for big data, AI, and elastic scaling workloads.
-
Monitor the cost and resource usage of a single application, or aggregate data for multiple related applications. For example, apply a consistent label to all applications in a big data pipeline to analyze the cost of the entire workflow.
Filter dimensions
|
Parameter |
Description |
|
Cost metric |
The metric used to calculate cluster costs. Options include:
For more information about payable amounts and list prices, see Billing details (offline and redirected). |
|
Namespace |
The namespace of the cluster to analyze. The default is All, which includes all namespaces. |
|
Workload type |
The type of cluster resource object. |
|
Workload name |
The name of the workload, filtered by the selected workload type. |
|
Label pair filter (LabelSelector) |
Enter the labels for the application Pods. You can use If a label key contains special characters such as must be converted to: |
|
Cost allocation model |
Specifies the model for allocating costs. You can choose a single-resource model or a weighted hybrid model. The following models are available:
For more information about choosing a cost allocation model, see Cost estimation strategies. |
|
Time range |
The time range for the dashboard. The default is the last 7 days. Setting this parameter allows you to view cost and resource trends over different periods. |
Cost overview
|
Metric |
Description |
|
Application cost |
The cost of the selected application for the time range specified on the dashboard, calculated using the list price. |
|
Current number of application replicas |
The minimum and maximum number of application Pod replicas. |
|
Application resource utilization share of the cluster/namespace |
The percentage of cluster or namespace resources consumed by the application. |
|
Hourly cost of hosting node |
The unit price per core-hour for each node hosting the application. |
|
Application runtime / Total consumed core-hours |
The total core-hours consumed by the application, based on its runtime. |
|
Compute resource utilization |
The CPU and memory utilization rate (Usage / Request). |
|
Pod-level business cost analysis |
Displays the resource status and real-time estimated cost for each Pod in the application. |
|
Application estimated cost trend |
The trend of the application's hourly cost and unit price per core-hour over a period of time. |
|
Application Pod scale trend |
A trend showing the number of application Pod replicas over time. |
|
The CPU, memory, and GPU request and usage trend charts show the following:
Allocated but unused application resources = Blue bars - Yellow bars Remaining allocatable cluster resources = y-axis - Blue bars Waste analysis workflow:
|
Billing strategies and Pod usage
|
Metric |
Description |
|
Predicts savings or additional costs if all nodes hosting the application used a single billing strategy, helping you optimize your resource mix. |
|
Includes billing strategy statistics and hourly cost statistics for the nodes where the application runs. Use this data to analyze the distribution and trends of different billing strategies for the application's underlying nodes. |
|
Analyzes cost consumption to help identify applications with high idle rates. The metrics are as follows:
|
FAQ
Why is cost data not displayed?
-
Check whether a NAT Gateway is configured for the cluster. Some regions do not support querying bills through an internal endpoint. Make sure that your cluster can access the Internet.
-
The Day-over-day cost change and Tomorrow's predicted cost metrics appear only after two consecutive days of cost data collection.
Why do namespace costs not match the bill?
Namespace costs are estimates based on list prices and do not account for coupons, discounts, or savings plans. As a result, these estimates may differ from your final bill. To allocate costs, multiply the total cluster cost by the cost percentage of each namespace.
Why are cloud products missing from the bill?
The cost analysis includes only cloud products used exclusively by a single cluster and excludes those shared by multiple clusters.
The Cost Insights feature relies on the cost allocation tag feature in the Expenses and Costs console. It uses a specific tag, 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 cannot be generated. To resolve this, go to the Cost Allocation Tags page and re-enable the ack.aliyun.com and ack.alibabacloud.com/nodepool-id tags.
Why is the cumulative cost lower than the actual cost?
Cost data is not backfilled. Cost Insights begins collecting data when you enable it for a cluster. Reports do not include costs incurred before activation.