Help Center> Cloud Container Engine> Best Practices> Cluster> Analyzing Costs by Cluster
Updated on 2024-05-31 GMT+08:00

Analyzing Costs by Cluster

Background

The billing information of CCE is displayed based on the entire service by default. The costs of different clusters are not shown.

Solution

Add the CCE-Cluster-ID tag to the resources used in the clusters, obtain the costs by searching for this tag in cost center, and then analyze the costs by cluster to improve efficiency and cut costs.

Constraints

Generally, tags appear on the Cost Tags page 24 hours after resource expenditures are generated.

You can filter or group cost data by tag only after the tags are activated. If you activate the tags, they will be used to organize your resource costs generated thereafter.

Procedure

  1. Activate the CCE-Cluster-ID tag.

    In Cost Center, choose Cost Allocation > Cost Tags in the navigation pane. Select Tag from the drop-down list for the filter criteria, search for CCE-Cluster-ID, and click Activate in the Operation column.

    Figure 1 Activating the cost tag

    The following information will be displayed.

    Figure 2 Activation succeeded

  2. Add the tag to resources used in a cluster.

    Resources used in a cluster include master nodes, worker nodes, storage resources (such as EVS disks, SFS file systems, and OBS buckets), and network resources (such as load balancers and EIPs). By default, the CCE-Cluster-ID tag is added to the worker nodes.

    • Add the tag to a cluster.

      On the CCE console, click the name of the target cluster to access the cluster console. On the Cluster Information page, add the resource tag in the Other area.

    • Add the tag to an EVS disk.

      On the EVS console, click the name of the target disk to go to the details page. On the Tags tab, add a tag.

    • Add the tag to an OBS bucket.

      On the OBS console, click the name of the target bucket to go to the details page. Choose Basic Configurations > Tagging and add a tag.

    • Add the tag to an SFS Turbo file system.

      On the SFS console, click the name of the target SFS Turbo file system to go to the details page. On the page displayed, click the Tags tab and add a tag.

    • Add the tag to a load balancer.

      On the ELB console, click the name of the target load balancer to go to the details page. On the page displayed, click the Tags tab and add a tag.

    • Add the tag to an EIP.

      On the EIP console, click the name of the target EIP to go to the details page. Click the Tags tab and add a tag.

  3. Analyze the cluster's costs.

    On the Cost Analysis page, choose CCE-Cluster-ID and the ID of the desired cluster from the drop-down list.
    Figure 3 Analyzing costs

    Click OK.

    Figure 4 Viewing the cluster's costs