# Filebeat autodiscover+kubernetes module or add\_kubernetes\_metadata processor?

**URL:** <https://discuss.elastic.co/t/filebeat-autodiscover-kubernetes-module-or-add-kubernetes-metadata-processor/263662>\
**Category:** Beats\
**Tags:** docker, filebeat\
**Created:** [February 8, 2021, 10:50pm UTC](https://discuss.elastic.co/t/filebeat-autodiscover-kubernetes-module-or-add-kubernetes-metadata-processor/263662 "2021-02-08T22:50:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![offero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/offero/32/83602_2.png) [@offero](https://discuss.elastic.co/u/offero)\
**Post date:** [February 8, 2021, 10:50pm UTC](https://discuss.elastic.co/t/filebeat-autodiscover-kubernetes-module-or-add-kubernetes-metadata-processor/263662/1 "2021-02-08T22:50:13Z")

</div>

I just set up a new helm chart to use add\_kubernetes\_metadata processor, which seemed to be the way to get k8s annotations based on my googling. But, in the process of trying to figure out which fields are being added, I came across this forum and some pointers to the autodiscover+kubernetes module configuration. Now I'm all backwards because I don't know which I should be using.

This example, for instance, uses the processor: [helm-charts/filebeat at master · elastic/helm-charts · GitHub](https://github.com/elastic/helm-charts/tree/master/filebeat)

Which should I be using? In what circumstances should we choose one over the other?

---

<div class="post-metadata">

**Author:** ![ChrsMark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrsmark/32/55858_2.png) [@ChrsMark](https://discuss.elastic.co/u/ChrsMark)\
**Post date:** [February 9, 2021, 2:32pm UTC](https://discuss.elastic.co/t/filebeat-autodiscover-kubernetes-module-or-add-kubernetes-metadata-processor/263662/2 "2021-02-09T14:32:40Z")

</div>

Hi!

Both ways should work on a base case (collect containers' logs and enrich them with k8s metadata).

You should prefer autodiscover k8s provider, which by default enriches events with k8s metadata, if you are interested to setup specific modules configuration based on templates or hints.

See [Autodiscover | Filebeat Reference [7.10] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-autodiscover.html) and [Hints based autodiscover | Filebeat Reference [7.10] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-autodiscover-hints.html) for more information.

C.

---

<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:** [March 9, 2021, 4:33pm UTC](https://discuss.elastic.co/t/filebeat-autodiscover-kubernetes-module-or-add-kubernetes-metadata-processor/263662/3 "2021-03-09T16:33:05Z")

</div>

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