Skip to main content

Understand GKE costs

DoiT Cloud Navigator: Enhanced and above


Google Cloud provides GKE cost allocation to assist customers in understanding their Google Kubernetes Engine (GKE) costs.

GKE cost allocation is based on resource requests, which are the lower bound on the amount of resources a container will receive. Such an approach makes GKE cost allocation more accurate and robust compared to consumption-based solutions.

See also

To learn more about the resource metrics in Kubernetes, see the Google Cloud blog post Kubernetes best practices: Resource requests and limits.

The DoiT Cloud Analytics reports can help you demystify your GKE spend. Using the data provided by GKE cost allocation, you can easily build advanced reports with real-time visibility into your GKE spend. As a result, you'll be able to:

  • Accurately track the total cost of ownership (TCO) of Kubernetes-based workloads across teams and product lines.

  • Plan better with realistic Kubernetes-based budgets.

  • Forecast and identify trends across Kubernetes primitives.

Enable GKE cost allocation


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

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.

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 for reports built with GKE cost allocation data.