<p>I am trying to setup Fluent Bit for Kuberentes on EKS + Fargate. I was able to get logs all going to one general log group on Cloudwatch but now when I add fluent-bit.conf: | to the data: field  and try to apply the update to my cluster, I get this error:</p>
<blockquote>
<p>for: &quot;fluentbit-config.yaml&quot;: admission webhook &quot;0500-amazon-eks-fargate-configmaps-admission.amazonaws.com&quot; denied the request: fluent-bit.conf is not valid. Please only provide output.conf, filters.conf or parsers.conf in the logging configmap</p>
</blockquote>
<p>What sticks out the most to me is that the error message is asking me to only provide output, filter or parser configurations.</p>
<p>It matches up with other examples I found online, but it seems like I do not have the fluent-bit.conf file on the cluster that I am updating or something. The tutorials I have followed do not mention installing a file so I am lost as to why I am getting this error.</p>
<p>The</p>
<p>My fluentbit-config.yaml file looks like this</p>
<pre><code>kind: Namespace
apiVersion: v1
metadata:
  name: aws-observability
  labels:
    aws-observability: enabled
---
kind: ConfigMap
apiVersion: v1
metadata:
  name: aws-logging
  namespace: aws-observability
  labels:
    k8s-app: fluent-bit
data:
  fluent-bit.conf: |
    @INCLUDE input-kubernetes.conf
    
  input-kubernetes.conf: |
    [INPUT]
        Name tail
        Parser docker
        Tag logger
        Path /var/log/containers/*logger-server*.log
        
  output.conf: |
    [OUTPUT]
        Name cloudwatch_logs
        Match logger
        region us-east-1
        log_group_name fluent-bit-cloudwatch
        log_stream_prefix from-fluent-bit-
        auto_create_group On
</code></pre>

<p>As per <a href="https://docs.aws.amazon.com/eks/latest/userguide/fargate-logging.html" rel="nofollow noreferrer">docs</a> (at the very bottom of that page and yeah, we're in the process of improving them, not happy with the current state) you have a couple of sections in there that are not allowed in the context of EKS on Fargate logging, more specifically what can go into the <code>ConfigMap</code>. What you want is something along the lines of the following (note: this is from an actual deployment I'm using, slightly adapted):</p>
<pre class="lang-yaml prettyprint-override"><code>kind: ConfigMap
apiVersion: v1
metadata:
  name: aws-logging
  namespace: aws-observability
data:
  output.conf: |
     [OUTPUT]
        Name cloudwatch_logs
        Match *
        region eu-west-1
        log_group_name something-fluentbit
        log_stream_prefix fargate-
        auto_create_group On
     [OUTPUT]
        Name  es
        Match *
        Host blahblahblah.eu-west-1.es.amazonaws.com
        Port 443
        Index something
        Type  something_type
        AWS_Auth On
        AWS_Region eu-west-1
        tls   On

</code></pre>
<p>With this config, you're streaming logs to both CW and AES, so feel free to drop the second OUTPUT section if not needed. However, you notice that there can not be the other sections that you had there such as <code>input-kubernetes.conf</code> for example.</p>
