Enable cost allocation in Google Cloud for Kubernetes cluster

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 1 minute to read
  • Enable cost allocation for each Kubernetes cluster before you run a Google Cloud Billing download job to view the Kubernetes spend.

    Before you begin

    Role required: Google Cloud administrator

    • You should be familiar with Google Cloud policies.
    • Install Discovery and Service Mapping Patterns application (sn_itom_pattern) 1.10.2 or higher. For more information, see Install Discovery and Service Mapping Patterns.
    • Install CMDB CI Class Models (sn_cmdb_ci_class) version 1.53.1 or higher. For more information, see CMDB CI Class Models store app.
    • To set up Kubernetes discovery, see .

    About this task

    • For identifying resources for Kubernetes clusters during billing download, the tag sn_ccm_k8_cluster_name is added to the resources, which already have goog-k8s-cluster-name tags.
    • You must enable cost allocation for each individual Kubernetes cluster.

    Procedure

    1. Log in to the Google Cloud Console.
    2. Select the hamburger icon (Hamburger).
    3. Select Kubernetes Engine.
    4. Select Clusters.
    5. In the Overview section, select a cluster name.
    6. In the Features section, enable Cost Allocation.

    Result

    The cost allocation for the selected Kubernetes cluster is enabled and you can view the Kubernetes spend.