# Metricbeat not processing kubernetes labels

**URL:** <https://discuss.elastic.co/t/metricbeat-not-processing-kubernetes-labels/144574>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [August 15, 2018, 6:56pm UTC](https://discuss.elastic.co/t/metricbeat-not-processing-kubernetes-labels/144574 "2018-08-15T18:56:31Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [August 22, 2018, 12:00pm UTC](https://discuss.elastic.co/t/metricbeat-not-processing-kubernetes-labels/144574/6 "2018-08-22T12:00:58Z")

</div>

Hi @fbcbarbosa,

> Isn't there some configuration that works out of the box for a kubernetes cluster? Maybe one that does not run on hostNetwork? For filebeat I just ran the helm chart and it worked like a charm (no official helm chart is available for metricbeat though).

Host network in metricbeat is recommended to collect also network metrics of the host and this is not needed in filebeat. In principle metricbeat can be run without host network mode if you are not interested on metrics of the host node.

> EDIT: I'm not sure hostNetwork would be the way to go though. According to [add\_kubernetes\_metadata](https://www.elastic.co/guide/en/beats/metricbeat/6.3/add-kubernetes-metadata.html), `host` is only required when `in_cluster` is set to `false` , which is not the case, as I am running metricbeat as part of the cluster. And if I set `in_cluster` to `false` , metricbeat breaks anyway:

Yes, the documentation is not very clear for some of these settings, we have started to do some improvements there ([#8036](https://github.com/elastic/beats/pull/8036), [#8029](https://github.com/elastic/beats/pull/8029)).

Regarding `add_kubernetes_metadata`, it is more intended to be used on events of non-kubernetes metricsets, for example to add the pod metadata to the metrics collected by other modules like nginx. This is a bit tricky when used with the `kubernetes` module, the indexers and matchers have to be modified and when it works it can unexpectedly overwrite other metrics under `kubernetes` namespace.

In 6.4 all the kubernetes metricsets will also collect labels when possible out of the box, probably the best option in your case is to wait for this release, it is expected to happen on the following days.

---

_[View the full topic](https://discuss.elastic.co/t/metricbeat-not-processing-kubernetes-labels/144574)._
