Quick Guide for Datadog Agent on Kubernetes for Logs

The Datadog Agent on Kubernetes collects logs, metrics, and traces from your cluster and sends them to Datadog for monitoring and analysis. This guide walks you through installing the agent using Helm, configuring pod-level metrics collection with annotations, and enabling log ingestion from your containerized applications.

Add the Datadog Helm repository

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

Configure datadog-values.yaml

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

Base configuration

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"
  #
yaml

Enable logs ingestion

...
datadog:
  ...
  logsEnabled: true
  logs:
    enabled: true
    containerCollectAll: true

agents:
  customAgentConfig:
    ...
    logs_config:
      #
      # Scenario default: Assumes that Kloudfuse stack & agent both in same VPC and in same K8S cluster
      #
      logs_dd_url: "kfuse-ingress-nginx-controller-internal.kfuse:80"
      logs_no_ssl: true
      #
      # Scenario 1: Kloudfuse stack & agent both in same VPC, but in different K8S cluster
      #
      # logs_dd_url: "<ingress-ip>:80"
      #
      # Scenario 2: Kloudfuse stack hosted in a different VPC (hosted at "customer.kloudfuse.io"). Make sure
      # to comment out the logs_no_ssl: true default above.
      #
      # logs_dd_url: "customer.kloudfuse.io:443"
      # logs_no_ssl: false
      #
      use_http: true
      auto_multi_line_detection: true
      use_v2_api: false
yaml

Deploy the agent with the configuration file

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