# Reading data from multiple namespaces in filebeat

**URL:** <https://discuss.elastic.co/t/reading-data-from-multiple-namespaces-in-filebeat/205655>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 29, 2019, 11:42am UTC](https://discuss.elastic.co/t/reading-data-from-multiple-namespaces-in-filebeat/205655 "2019-10-29T11:42:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![whoatemyjam](https://avatars.discourse-cdn.com/v4/letter/w/5f9b8f/32.png) [@whoatemyjam](https://discuss.elastic.co/u/whoatemyjam)\
**Post date:** [October 29, 2019, 11:42am UTC](https://discuss.elastic.co/t/reading-data-from-multiple-namespaces-in-filebeat/205655/1 "2019-10-29T11:42:13Z")

</div>

hi  
How to add multiple namespaces in input

```
kind: ConfigMap
metadata:
  name: filebeat-inputs
  namespace: "{{ namespace }}"
  labels:
    k8s-app: filebeat
data:
  kubernetes.yml: |-
    - type: docker
      containers.ids:
      - "*"
      processors:
        - add_kubernetes_metadata:
            in_cluster: true
            namespace: some namespace

```

The above config works for one name space but fails when i do this

```
kind: ConfigMap
metadata:
  name: filebeat-inputs
  namespace: "{{ namespace }}"
  labels:
    k8s-app: filebeat
data:
  kubernetes.yml: |-
    - type: docker
      containers.ids:
      - "*"
      processors:
        - add_kubernetes_metadata:
            in_cluster: true
            namespace: namepspace-01
            namespace: namepspace-02

```

Then filbeat fails

Is there a way to add multiple namespaces in filebeat so as to read data only from them  
is autodiscover the way ??

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 26, 2019, 11:42am UTC](https://discuss.elastic.co/t/reading-data-from-multiple-namespaces-in-filebeat/205655/2 "2019-11-26T11:42:18Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
