# Quick Guide for Datadog Agent on Kubernetes for Traces

This guide explains how to deploy the Datadog Agent on Kubernetes to collect distributed traces from your applications. You will add the Datadog Helm repository, configure pod-level tracing using annotations, and deploy the agent with the necessary settings to begin capturing trace data.

## Add the Datadog Helm repository

```console
helm repo add datadog https://helm.datadoghq.com
helm repo update
```

## Configure `datadog-values.yaml`

For pod-level traces, add Datadog annotations to enable scraping.

### Base configuration

```yaml
fullnameOverride: "kfuse-agent"
nameOverride: "kfuse-agent"
datadog:
  apiKey: " "
  #
  # Scenario default: Assumes that Kloudfuse stack & agent both in same VPC and in same K8S cluster
  #
  dd_url: "http://kfuse-ingress-nginx-controller-internal.kfuse/ingester"
  #
  # Scenario 1: Kloudfuse stack & agent both in same VPC, but in different K8S cluster
  #
  # dd_url: "http://<ingress-ip>/ingester"
  #
  # Scenario 2: Kloudfuse stack hosted in a different VPC (hosted at “customer.kloudfuse.io”)
  #
  # dd_url: "https://customer.kloudfuse.io/ingester"
  #
```

### Enable tracing

```yaml
...
datadog:
  ...
apm:
    enabled: true
    portEnabled: true

agents:
  customAgentConfig:
  ...
apm_config:
    enabled: true
    apm_non_local_traffic: true
    #
    # Scenario default: Assumes that Kloudfuse stack & agent both in same VPC and in same K8S cluster
    #
    apm_dd_url: "kfuse-ingress-nginx-controller-internal.kfuse:80/ingester"
    #
    # Scenario 1: Kloudfuse stack & agent both in same VPC, but in different K8S cluster
    #
    # apm_dd_url: "http://<ingress-ip>/ingester"
    #
    # Scenario 2: Kloudfuse stack hosted in a different VPC (hosted at “customer.kloudfuse.io”)
    #
    # apm_dd_url: "https://customer.kloudfuse.io/ingester"
```

## Deploy the agent with the configuration file

```console
helm install datadog-agent -f datadog-values.yaml datadog/datadog
```
