<p>I would like to run telegraf as daemonset but it complains about volumemounts.</p>

<p>I've followed <a href="https://www.howtoforge.com/tutorial/centos-kubernetes-docker-cluster/" rel="nofollow noreferrer">this</a> article to create my kubernetes cluster.</p>

<p>Now try to follow <a href="https://www.influxdata.com/blog/monitoring-kubernetes-architecture/" rel="nofollow noreferrer">this</a> article to setup telegraf metrics sendings to our kafka endpoint.</p>

<p><a href="https://pastebin.com/jzq6aUpE" rel="nofollow noreferrer">This</a> is my yaml configuration.</p>

<p>When I try to run kubectl apply -f /tmp/telegraf.yaml
I got this error:</p>

<pre><code>configmap/telegraf unchanged
The DaemonSet "telegraf" is invalid:
* spec.template.spec.containers[0].volumeMounts[1].name: Not found: "docker"
* spec.template.spec.containers[0].volumeMounts[3].mountPath: Invalid value: "/var/run/docker.sock": must be unique
</code></pre>

<p>What is the issue to move forward?</p>

<p>Remove these lines from manifest:</p>

<pre><code>- name: docker
  mountPath: /var/run/docker.sock
  readOnly: true
</code></pre>
