# Analyzing GKE costs

Follow the below steps to enable GKE cost allocation and integrate detailed usage cost export with Economize, allowing you to analyze GKE costs within [Reports](https://docs.economize.cloud/product-features/reports).

## Step 1: Enable GKE cost allocation

Refer to the official GCP documentation below to enable GKE cost allocation for all the clusters of a project for which you wish to analyze costs within the Economize console.

{% embed url="<https://cloud.google.com/kubernetes-engine/docs/how-to/cost-allocations#enable_breakdown>" fullWidth="false" %}

## Step 2: Enable detailed usage cost export

{% hint style="info" %}
You can skip step 2 if you already enabled the Detailed usage cost export during [onboarding](https://docs.economize.cloud/gcp-onboarding/integrating-a-gcp-project-with-economize#step-3-enable-cloud-billing-export-to-the-bigquery-dataset).&#x20;
{% endhint %}

GCP provides an option to export your billing data to the BigQuery dataset. This consists of details regarding your usage, and pricing data.

1. Click the hamburger menu at the top left of the GCP console, and select **Billing**.
2. In the left **Billing navigation menu**, select **Billing Export**.
3. For **Detailed usage cost**, click **EDIT SETTINGS** to enable them.
4. Configure the following settings in accordance with the steps you performed during onboarding:
   * From the **Projects** list, select the project you set up to contain your billing data.
   * For **Dataset**, select the dataset that you set up to contain your exported Cloud Billing data during onboarding.
5. Click on **SAVE**.
6. Once the export is enabled it will indicate the same as follows.

<figure><img src="https://4121990823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn3X3NsKiruYotJHSzbQX%2Fuploads%2FSid4OCqrXTek1Z9tF2kY%2FScreenshot%202024-03-14%20at%201.28.10%20PM.png?alt=media&#x26;token=fbece0f9-1d9b-413e-a73b-5ea0525c1200" alt="" width="563"><figcaption></figcaption></figure>

## Step 3: Link the billing dataset with Economize

1. Navigate to the [Projects page](https://www.economize.cloud/app/settings/projects) within Economize settings, and click on the Pen icon of the project you enabled GKE cost allocation in step 1, to update its configuration.
2. Enter the **Dataset ID** of the BigQuery dataset you used in step 2 in the following text field.

<figure><img src="https://4121990823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn3X3NsKiruYotJHSzbQX%2Fuploads%2FNJmdR1pdYkLGCEqXzvX0%2FScreenshot%202024-03-14%20at%201.35.08%20PM.png?alt=media&#x26;token=24d8ab38-a178-4214-b08d-9a174808999c" alt="" width="563"><figcaption></figcaption></figure>

3. Test your connection to the dataset by clicking on the **Test** button.
4. Click on the **Save Changes** button.

<figure><img src="https://4121990823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn3X3NsKiruYotJHSzbQX%2Fuploads%2FppYBT0DqTA6TKJdGkn5K%2FScreenshot%202024-03-14%20at%201.37.18%20PM.png?alt=media&#x26;token=feaf93d8-fd18-44eb-a412-04e610ec0a25" alt="" width="483"><figcaption></figcaption></figure>

{% hint style="success" %}
**SUCCESS**

You can now navigate to the [Reports](https://www.economize.cloud/app/gcp/reports) within the Economize console and start analyzing the GKE costs.
{% endhint %}
