Search code examples
kubernetesdatadog

Proper Setup of Datadog Log Ingestion on Kubernetes


I have been working with Datadog log ingestion for about a year now. It's been (mostly) great to work with. The documentation around running it inside of Kubernetes is a bit lacking though. Their documentation covers Docker thoroughly, but Kubernetes less so.

When I installed Datadog into our Kubernetes clusters a year ago, there were two ways to do it, you could use a DaemonSet to ensure at least 1 Pod of Datadog runs on every Node. Or you could install it as a Deployment. I went with the DaemonSet option and used Helm to install it. That worked quite well!

Then we wanted to start using DogStatsD to ingest metrics about our applications, and it seemed at the time like this required the "cluster-agent" to run. I have serious doubts about this part. If I get all of the Datadog-related objects in my cluster I see the DaemonSet (daemonset.apps/dd-agent-datadog) and I also see a Deployment (daemonset..apps/dd-agent-datadog) on my cluster.

Is this right? Do I really need to run both of those things to get log ingestion and metrics?


Solution

  • enter image description hereDatadog has two agents.

    1. Cluster agent which is a proxy between Kubernetes API Server and Datadog node agents. The cluster agent is deployed as deployment to one of the kubernetes node.
    2. Node agents which is deployed in each and every Kubernetes node as Daemonset.

    And yes for DogStatsD the node agents need to be deployed as Daemonset.

    Here is the the deployment manifest for cluster agent and node agent.