Connect Google Cloud billing
Read your detailed billing export in BigQuery with a service account that can view the dataset and run queries.
Who does what
How Google Cloud data reaches KubeOn
- 01
Billing export
Cloud Billing detailed usage cost export to BigQuery, net of committed use discounts and credits.
Your billing project
- 02
Read-only access
A service account with BigQuery Data Viewer on the export dataset and Job User in the billing project.
KubeOn service account
- 03
Cluster snapshots
A cluster token from KubeOn. No service account or bucket: snapshots go to your organization in KubeOn and nowhere else.
Agent in each cluster
- 04
Allocate + reconcile
The hub joins hourly snapshots with the bill, allocates each node's cost to pods, teams and labels, and reconciles every cluster to its bill.
KubeOn hub
The KubeOn agent never changes your clusters. The billing service account only reads, and the agent can only write snapshots.
No keys needed
Grant access
# Prerequisite: Cloud Billing > Billing export > Detailed usage cost to BigQuery# dataset: acme-billing:billing_export. GKE cost allocation is optional.gcloud iam service-accounts create kubeon-billing \ --project acme-billing --display-name "KubeOn billing reader"# Read the billing export datasetbq add-iam-policy-binding \ --member="serviceAccount:kubeon-billing@acme-billing.iam.gserviceaccount.com" \ --role="roles/bigquery.dataViewer" \ acme-billing:billing_export# Run queries in the billing projectgcloud projects add-iam-policy-binding acme-billing \ --member="serviceAccount:kubeon-billing@acme-billing.iam.gserviceaccount.com" \ --role="roles/bigquery.jobUser"GKE cost allocation
Optional. With cost allocation enabled, the billing export carries namespace and label detail for GKE workloads, which KubeOn uses as a cross-check.
gcloud container clusters update gke-prod-usc1 \ --region us-central1 \ --enable-cost-allocationAdd the integration
In Settings > Integrations, choose Google Cloud and enter the project, dataset and table of the export, and the service account.