# Connect to Datadog Kubernetes

## Overview

To set up the Datadog Kubernetes integration, create an API key and an application key in your Datadog account to allow Finout secure access. Then enter these keys in Finout to connect your Datadog account.

Finout uses [Datadog-collected Kubernetes usage metrics](https://docs.finout.io/kubernetes-integrations/kubernetes/datadog) to allocate cluster costs across Kubernetes workloads.

Once connected, Datadog is configured in Finout both as a cost center via Datadog’s billing API and as a Kubernetes metrics source for [K8s cost allocation](https://docs.finout.io/kubernetes-integrations/kubernetes/how-finout-calculates-kubernetes-costs).

## Prerequisites:&#x20;

Finout also creates a Datadog cost center when you set up the Kubernetes integration.&#x20;

This means that Datadog’s billing data will be automatically monitored in Finout, either via UAT or the Custom Tags integration, depending on your Datadog account type.

Ensure your data is tagged using UAT at the parent organization level in Datadog.

{% hint style="info" %}
**Note**: If you are unsure how to verify these, contact Finout support at <support@finout.io> for further assistance.
{% endhint %}

## Setting up Datadog Kubernetes Integration

### **1. Create an API Key** <a href="#h_4e104f0fbc" id="h_4e104f0fbc"></a>

1. Log into your Datadog account.<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FdDibfqFSk1I1IKTxLaNr%2Fimage.png?alt=media&#x26;token=a29a6fd4-2aca-4bb4-b5a4-94146f6dbc06" alt=""><figcaption></figcaption></figure>
2. Hover over your Datadog user and select **Organization Settings.**\
   The **Organization Settings** view appears.<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FLdVKbHiIahSxeYshhoY7%2Fimage.png?alt=media&#x26;token=8165221d-e73c-41c1-a575-7ec777bcc66c" alt=""><figcaption></figcaption></figure>
3. Click **API Keys**.\
   The **New API Key** pop-up appears.<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FUORNVXqX0NSowbCzRdNA%2Fimage.png?alt=media&#x26;token=aee38d0b-6184-4284-8a5a-e7452da59044" alt=""><figcaption></figcaption></figure>
4. Enter an API key name and click **Create Key**.<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FvI6JtF9huAvAXf96Y24q%2Fimage.png?alt=media&#x26;token=414d5206-6ebc-48c3-b3b2-e34e8f9a5ec6" alt=""><figcaption></figcaption></figure>
5. Copy the new API key, save it for later (step 3), and click **Finish**.

### **2. Create an Application Key** <a href="#h_1589c03d0d" id="h_1589c03d0d"></a>

<figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FxLM4tCGslElC8mx3nnEZ%2Fimage.png?alt=media&#x26;token=964754df-192c-477d-81bb-512daba969e5" alt=""><figcaption></figcaption></figure>

1. In your Datadog account, hover over your Datadog user and select **Organization Settings.**<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FR1E30XSXudrE8PQk38Ff%2Fimage.png?alt=media&#x26;token=ccdd4241-5fa6-4b8c-9254-b49007e2c135" alt=""><figcaption></figcaption></figure>
2. Choose **Application Keys.**<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FSc85BLhWuibS0NUKEcKJ%2Fimage.png?alt=media&#x26;token=6a75a194-244d-40aa-8887-2c5d9131f85a" alt=""><figcaption></figcaption></figure>
3. Enter an API key name and click **Create Key**.<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FyW9KaFYN100JhEaq1AgG%2Fimage.png?alt=media&#x26;token=b16364eb-aedf-4d11-bb6d-f82dd6946543" alt=""><figcaption></figcaption></figure>
4. The default configuration is a non-scoped app key. \
   To scope the API key, click **Edit** under the scope section.\
   The **Edit Key Scope** appears.<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2F71Kkyl3Y8fToqiFl9UEQ%2Fimage.png?alt=media&#x26;token=8f232f00-f085-442f-876c-922fe0244d35" alt=""><figcaption></figcaption></figure>
5. Choose the relevant scopes according to [this table](https://docs.finout.io/billing-integrations/observability-platforms/connect-to-datadog/datadog-integration-levels) and click **Save**.<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FcBEEGAM5njm5fMvZmDF0%2Fimage.png?alt=media&#x26;token=23469f56-462a-4f0b-b763-db91abbfd077" alt=""><figcaption></figcaption></figure>
6. Copy the new App key and save it for later (step 3).

### 3. Create the Datadog Kubernetes Cost Center in Finout

1. In Finout, navigate to **Settings**.<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FSInfuWNJEvyiCbLnR3Yx%2Fimage.png?alt=media&#x26;token=ba7543df-47ce-41ef-a9ec-b8be75331c29" alt=""><figcaption></figcaption></figure>

2. Click **Cost Centers.**\
   You are brought to the cost centers page.<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FJgBYtb1x3elMX3HvWdsD%2Fimage.png?alt=media&#x26;token=2800032a-66c3-4431-afd6-f7fc5549c587" alt=""><figcaption></figcaption></figure>

3. Click **Add cost center**.\
   The **Connect Accounts** popup appears.<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2F2rD5ghNPrqkZdUWEaxqw%2Fimage.png?alt=media&#x26;token=833654a9-0868-40ed-a82f-828fb30c514d" alt=""><figcaption></figcaption></figure>

4. Find Datadog and click **Connect Now**.\
   The **Connect Datadog** step appears.<br>

   <div align="left"><figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FUu50aedJe38XNrz5DSOs%2Fimage.png?alt=media&#x26;token=a5b5364f-c805-45fc-a7af-11c4c805151c" alt=""><figcaption></figcaption></figure></div>

5. Add a **Cost Center Name.**

6. **Select the integration type:** Kubernetes metrics + Cost Center

7. **Select the Datadog account type: Enterprise or Non-Enterprise (Free/Pro).**\
   &#x20;This selection determines the integration method:
   * **Enterprise/Pro accounts** use [**UAT** integration](https://docs.finout.io/billing-integrations/observability-platforms/connect-to-datadog/datadog-usage-attribution-tags-uat) (default method).
   * **Free accounts** use **Custom Tags** integration.

     <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FdrRmSOEdYJVavakqwr9Q%2Fimage.png?alt=media&#x26;token=c1bd9ceb-7916-42ce-acd9-9a61ffcce6a6" alt=""><figcaption></figcaption></figure>

8. Add the API key and APP key (created in steps 1 and 2) and click **Next**.\
   You are brought to the **Select Cost Centers (Beta)**.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Note</strong>: <em>This step is currently beta</em>. If this step is unavailable to you, contact support at support@finout.io to complete the setup.</p></div>

   <br>

   <div align="left"><figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2F5HuQ1Psjw30R29G8MA83%2Fimage.png?alt=media&#x26;token=36d6744e-48ee-4657-9d53-bc69373d2137" alt=""><figcaption></figcaption></figure></div>

9. Select the cost centers that this integration will enrich with Kubernetes metrics. These cost centers can then attribute Kubernetes costs for supported services (EKS, GKE, and AKS) by namespace, workload, and label.

10. Click **Complete Integration**. \
    The cost center is created, and your Datadog billing and Kubernetes data will be available in the next 48 hours.

{% hint style="info" %}
**Note**:

* If this cost center is already enriched by a Kubernetes integration, ensure there are no overlapping nodes between the integrations to avoid duplicated costs and resources.
* You can hover over every created cloud cost center and see all the Kubernetes cost centers that enrich it.

  <figure><img src="https://docs.finout.io/~gitbook/image?url=https%3A%2F%2F3858159242-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FWqjB2puKXPDR7L86FX2e%252Fuploads%252FCeKySfVSrCoxamJ1Nv8P%252Fimage.png%3Falt%3Dmedia%26token%3D8dface99-81fe-4b43-a9bc-f17c4acc97e3&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=c972410d&#x26;sv=2" alt=""><figcaption></figcaption></figure>

{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.finout.io/kubernetes-integrations/kubernetes/datadog/connect-to-datadog-kubernetes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
