Enable cost allocation in Google Cloud for Kubernetes cluster

  • Release version: Xanadu
  • Updated August 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

    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.