Skip to content

Instantly share code, notes, and snippets.

@matiasah
Last active December 5, 2022 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matiasah/23c749cb29fae16fb8699bf049aa53db to your computer and use it in GitHub Desktop.
Save matiasah/23c749cb29fae16fb8699bf049aa53db to your computer and use it in GitHub Desktop.
Install DataDog Cluster agent

Setup Firewall Rule

Make sure that your cluster's network segment has connectivity enabled toward itself using the following ports:

TCP 8000 (bidirectional) - for DataDog Admission Controller
TCP 8125 (bidirectional) - for DataDog dogstatd

Add Helm repo

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

Create namespace

kubectl create namespace datadog

Create API Key

kubectl create secret generic datadog-secret --namespace datadog --from-literal api-ley=<API KEY> --dry-run=client -o yaml | kubectl apply -f -

Create values.yaml

repository: ???

datadog:
  apiKeyExistingSecret: datadog-secret
  apm:
    portEnabled: true
  logs:
    enabled: true
    containerCollectAll: true
  logLevel: DEBUG
  networkMonitoring:
    enabled: true
    serviceEndpoints: true
  serviceMonitoring:
    enabled: true

clusterAgent:
  enabled: true
  image:
    tag: 7.39.1
    repository: ????
  securityContext:
    runAsUser: 101
  additionalLabels:
    cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
  metricsProvider:
    enabled: false
  admissionController:
    enabled: true
    mutateUnlabelled: false
    configMode: "service"
  replicas: 2
  createPodDisruptionBudget: true

agents:
  enabled: true
  image:
    tag: 7
    repository: ???
  securityContext:
    runAsUser: 101
  podSecurity:
    podSecurityPolicy:
      create: true
  additionalLabels:
    cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
  localService:
    forceLocalServiceEnabled: true

Template Cluster Agent

helm template datadog -f values.yaml datadog/datadog --namespace datadog -- debug > datadog-cluster-agent.yaml

Install Cluster Agent

kubectl apply -f datadog-cluster-agent.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment