<p>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. </p>

<p>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!</p>

<p>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 (<code>daemonset.apps/dd-agent-datadog</code>) and I also see a Deployment (<code>daemonset..apps/dd-agent-datadog</code>) on my cluster. </p>

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

<p><a href="https://i.stack.imgur.com/MNeRh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MNeRh.png" alt="enter image description here"></a>Datadog has two agents.</p>

<ol>
<li>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.</li>
<li>Node agents which is deployed in each and every Kubernetes node as Daemonset.</li>
</ol>

<p>And yes for DogStatsD the node agents need to be deployed as Daemonset.</p>

<p>Here is the the deployment manifest for <a href="https://github.com/DataDog/datadog-agent/blob/master/Dockerfiles/manifests/cluster-agent/cluster-agent.yaml" rel="nofollow noreferrer">cluster agent</a> and <a href="https://github.com/DataDog/datadog-agent/blob/master/Dockerfiles/manifests/agent.yaml" rel="nofollow noreferrer">node agent</a>.</p>
