You can use pod tags to filter the cost details of pods in an ACK Serverless cluster by cluster, namespace, workload type, and workload name.
Introduction
Pods that run in ACK Serverless clusters are deployed on elastic container instances. Pods in ACK Serverless clusters have fixed tags. You can enable one or more cost allocation tags on the Cost allocation tags tab of the Alibaba Cloud User Center page. After you enable the cost allocation tags, you can select instance tags and cost tags to filter the costs.
Use the console to view cost details
Log on to Expenses and Costs.
In the left-side navigation pane, choose .
On the Cost allocation tags page, select cost tags based on your requirements and click Batch Enable.
Cost allocation tag
Description
ClusterId
The cluster ID.
NameSpace
The namespace name.
OwnerReferenceKind
The workload type, such as Deployment and Job.
OwnerReferenceName
The workload name, such as the Deployment name and Job name.
In the left navigation pane, click Cost Analysis.
On the Cost Analysis page, configure query conditions and view a detailed cost breakdown for the Elastic Container Instance (ECI) in your cluster.
NoteIf you are using the cost analysis feature for the first time, follow the on-screen prompts to activate it.
To filter this view by resource tags, select Instance Tag as the Category of Analysis Dimension, then choose the specific tags you wish to analyze. This will display the costs associated only with the resources that have those tags.
Use scenarios
The following table describes the use scenarios in which you need to view cost details on the Cost Analysis page. You must first complete the following operations:
Enable cost allocation tags and cost analysis. For more information, see Use the console to view cost details.
Obtain the ID of the cluster that you want to manage. For more information, see View cluster information.
Scenario description | Prerequisite | Configuration method | Example |
View the costs of all pods in a cluster | The ClusterId tag is enabled. | a. Category: Choose Instance Tag > ClusterId. b. Filters: Choose Tag > ClusterId and select the cluster ID. |
|
View the costs of all pods in a namespace of a cluster | The ClusterId and NameSpace tags are enabled. | a. Category: Choose Instance Tag > NameSpace. b. Filters: Choose Tag > ClusterId and select the cluster ID. |
|
View the costs of all pods created by workloads of the specified type in a cluster | The ClusterId and OwnerReferenceKind tags are enabled. | a. Category: Choose Instance Tag > OwnerReferenceKind. b. Filters: Choose Tag > ClusterId and select the cluster ID. |
|
View the costs of all pods created by a workload with the specified name in a cluster | The ClusterId and OwnerReferenceName tags are enabled. | a. Category: Choose Instance Tag > OwnerReferenceName. b. Filters: Choose Tag > ClusterId and select the cluster ID. |
|
References
If you want to allocate costs by resource group, see Allocate the costs of ECS instances by resource group.
For more information about the billing of ACK Serverless, see Billing of ACK Serverless clusters.



