Kubecost Cloud GCP Integration
Kubecost Cloud provides the ability to allocate out of cluster (OOC) costs back to Kubernetes concepts like namespaces and deployments. The following guide provides the steps required for allocating OOC costs in GCP.
You will need to prepare the following fields:
- GCP Project Id: The ID of your GCP project.
- GCP Dataset: BigQuery dataset prefix
- GCP Table: BigQuery table name.
If you are having trouble determining these values, consider this example. A dataset
billing_data.gcp_billing_export_v1_018AIF_74KD1D_534A2under a project
project-1will have the following values:
- Project ID:
- Dataset Name:
In the Kubecost Cloud UI, begin by selecting Settings in the left navigation. Scroll down to Cloud Integrations, then select View Additional Details. The Cloud Integrations dashboard opens. Select + Add Integration. Then, select GCP Integration from the slide panel.
After completing the Prerequisites section, you will fill out the three fields in this step with the respective values (Project Id, Dataset, and Table). All fields are mandatory. Then, select Continue.
You will need to give your Kubecost GCP service account certain permissions in your project
roles/bigquery.jobUser. This can be performed either through the gcloud CLI or the GCP Console. Follow the instructions as they appear directly in the UI. Then, select Continue.
Finally, you must give the Kubecost service account direct access to your BigQuery dataset via the BigQuery Data Viewer role. Like Step 2, this can be performed either through the gcloud CLI or the GCP Console. Follow the instructions as they appear directly in the UI. Then, select Continue.
After completing Step 3, you will see an overview of details for your integration. You can correct any details by selecting Edit. The Status should initially display as Unknown. This is normal. If everything looks correct, select Close to return to the Cloud Integrations dashboard. Your integration will now appear as a line item.