<p>While trying to install "incubator/fluentd-cloudwatch" using helm on Amazon EKS, and setting user to root, I am getting below response.</p>

<p>Command used : </p>

<pre><code>helm install --name fluentd incubator/fluentd-cloudwatch --set awsRegion=eu-west-1,rbac.create=true --set extraVars[0]="{ name: FLUENT_UID, value: '0' }"
</code></pre>

<p>Error: </p>

<pre><code>Error: YAML parse error on fluentd-cloudwatch/templates/daemonset.yaml: error converting YAML to JSON: yaml: line 38: did not find expected ',' or ']'
</code></pre>

<p>If we do not set user to root, then by default, fluentd runs with "fluent" user and its log shows:</p>

<pre><code>[error]: unexpected error error_class=Errno::EACCES error=#&lt;Errno::
EACCES: Permission denied @ rb_sysopen - /var/log/fluentd-containers.log.pos&gt;`
</code></pre>

Abhizer Saifee
<p>Based on <a href="https://github.com/helm/charts/blob/master/incubator/fluentd-cloudwatch/templates/daemonset.yaml#L38" rel="nofollow noreferrer">this</a> looks like it's just trying to convert <code>eu-west-1,rbac.create=true</code> to a JSON field as field and there's an extra comma(,) there causing it to fail. </p>

<p>And if you look at the <a href="https://github.com/helm/charts/blob/master/incubator/fluentd-cloudwatch/values.yaml" rel="nofollow noreferrer">values.yaml</a> you'll see the right separate options are <code>awsRegion</code> and <code>rbac.create</code> so <code>--set awsRegion=eu-west-1 --set rbac.create=true</code> should fix the first error.</p>

<p>With respect to the <code>/var/log/... Permission denied</code> error, you can see <a href="https://github.com/helm/charts/blob/master/incubator/fluentd-cloudwatch/templates/daemonset.yaml#L74" rel="nofollow noreferrer">here</a> that its mounted as a <a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="nofollow noreferrer"><code>hostPath</code></a> so if you do a: </p>

<pre><code># (means read/write user/group/world)
$ sudo chmod 444 /var/log 
</code></pre>

<p>and all your nodes, the error should go away. Note that you need to add it to all the nodes because your pod can land anywhere in your cluster.</p>
