All Products
Search
Document Center

Container Service for Kubernetes:View cost details

Last Updated:May 10, 2024

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

  1. Log on to the Billing Management console.

  2. In the left-side navigation pane, choose Cost Allocation > Cost allocation tags.

  3. On the Cost allocation tags page, select cost tags based on your requirements and click Batch Enable in the lower part of the page.

    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.

  4. In the left-side navigation pane, choose Cost Management > Cost Analysis.

    Note

    If this is the first time you enable Cost Analysis, click Activate Now.

  5. On the Cost Analysis page, select Instance Tag from the Category drop-down list. Then, select a tag and the corresponding filters to view the cost details about the elastic container instances that match the tag and filters.

    Parameter

    Description

    Example

    Instance tag

    You can select the following tags:

    • Instance Tag > ClusterId

    • Instance Tag > NameSpace

    • Instance Tag > OwnerReferenceKind

    • Instance Tag > OwnerReferenceName

    Instance Tag > ClusterId

    Filter

    If you select multiple tags, the union of all pods that match the tags is displayed. For example, if you select ClusterID=A and NameSpace=default and the pod collection that matches ClusterID=A is {Pod_A, Pod_B, Pod_C} and the pod collection that matches NameSpace=default is {Pod_A, Pod_D, Pod_E}, the pod union that matches the two tags is {Pod_A, Pod_B, Pod_C,Pod_D, Pod_E}.

    None

    1.jpg

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:

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.

3.jpg

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.

6.jpg

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.

8.jpg

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.

9.jpg

References