Skip to main content

GKE cost allocation

GKE cost allocation is a Google Cloud feature that helps you understand your Google Kubernetes Engine (GKE) costs.

Enable GKE cost allocation

GKE cost allocation is enabled on the cluster level. You can enable it while creating a new cluster or updating an existing one.

Refer to the Google Cloud Docs for configuration and verification instructions.

Tip

You only need to enable GKE cost allocation in Google Cloud. The DoiT Platform doesn't need extra permissions.

Analyze GKE cost

GKE cost allocation allows you to see cost breakdowns in clusters for namespaces, and pod labels for utilized CPU and MEM.

Google Kubernetes Engine dimensions

Once GKE cost allocation is enabled in Google Cloud, you'll see the following Google Kubernetes Engine dimensions in the DoiT Cloud Analytics Reports:

  • GKE Cluster: A cluster is the foundation of Google Kubernetes Engine (GKE). The Kubernetes objects that represent your containerized applications all run on top of a cluster. This field is based on the Google Cloud billing data with the label key goog-k8s-cluster-name.

  • GKE Namespace: The Kubernetes namespace where the usage is generated. This field is based on the Google Cloud billing data with the label key k8s-namespace.

GKE labels

GKE labels are found in the dedicated label section named GKE Labels in the DoiT Cloud Analytics reports. You can use them together with other labels (including other Google Cloud labels) in the same report.

Standard dimensions

When applying the standard dimension Service, be aware of the differences between the two options below:

  • Kubernetes Engine (GKE): Choose this service to get the costs of GKE control plane.

  • Compute Engine (GCE): Choose this service to get the costs of actual resource consumption of the clusters. You can break down the costs by using the DoiT system label cmp/compute_resource_name (alias:GCE Resource).

See also

What's next

Check out GKE Lens dashboard for reports built with GKE cost allocation data.