title: Filebeat configuration file troubles
body: <p>I have installed elasticsearch, kibana and filebeat on kubernetes cluster version 7.6.1 within separate namespace.
  My main goal was gather logs from other two namespaces within this cluster.
  But still I have troubles with filebeat configuration file. I need to read logs from all pods of these namespaces. I have tried many configs and unfortunately it doesn't work well (gathers logs only from one namespace and/or from few pods).
  I am new in that direction, so I hope I made stupid mistake and You can help me)</p>
  <p>Below is one of many configs I have tried:</p>
  <pre><code>filebeat.autodiscover:
    providers:
      - type: kubernetes
        templates:
          - condition:
              contains:
                kubernetes.namespace: &quot;namespace-1&quot;
            config:
              - type: container
                paths:
                  - &quot;/var/lib/docker/containers/${data.kubernetes.container.id}/${data.kubernetes.container.id}-json.log&quot;
          - condition:
              contains:
                kubernetes.namespace: &quot;namespace-2&quot;
            config:
              - type: container
                paths:
                  - &quot;/var/lib/docker/containers/${data.kubernetes.container.id}/${data.kubernetes.container.id}-json.log&quot;
  </code></pre>
  <p>Thank you in advance)</p>