This document shows you how get key spending insights to inform your resource allocation and cost optimization decisions using Google Kubernetes Engine (GKE) cost allocation. Learn about the difference between GKE cost allocation and cluster usage metering, limitations of GKE cost allocation, how to activate GKE cost allocation on both new and existing clusters, and how to filter and query your Cloud Billing BigQuery export.
This document is for Operators, Cloud architects, Developers, and Data administrators who need to manage costs as they create and configure clusters and deploy workloads in GKE. To learn more about common roles, see Common GKE user roles and tasks.
Before reading this document, you might want to familiarize yourself with Best practices for running cost-optimized Kubernetes applications on GKE
Potential data volume increase
Enabling GKE cost allocation can increase your storage and querying costs in BigQuery. The exact increase depends on the number of distinct label and namespace combinations you use across Pods and clusters.
Enabling GKE cost allocation does not change the total cost of your GKE usage. The sum of the cost line items in your export is the same and existing queries and reports you have built on the billing export return the same values.
GKE cost allocation and cluster usage metering
GKE cost allocation is different from cluster usage metering in the following ways:
- GKE cost allocation provides an alternative to cluster usage metering for getting cluster information.
- GKE cost allocation calculates cluster costs in your Cloud Billing account instead of aggregating the data in a Data Studio template.
- GKE cost allocation lets you view a clusters cost data in the Cloud Billing Google Cloud console and in the Cloud Billing detailed export.
Before you begin
Before you start, make sure that you have performed the following tasks:
- Enable the Google Kubernetes Engine API. Enable Google Kubernetes Engine API
- To use the Google Cloud CLI for this task, install and then initialize the gcloud CLI. If you previously installed the gcloud CLI, get the latest version by running the