# Kubernetes labels are missing in pod and container metricsets

**URL:** <https://discuss.elastic.co/t/kubernetes-labels-are-missing-in-pod-and-container-metricsets/195505>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [August 16, 2019, 1:45pm UTC](https://discuss.elastic.co/t/kubernetes-labels-are-missing-in-pod-and-container-metricsets/195505 "2019-08-16T13:45:00Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![asp](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@asp](https://discuss.elastic.co/u/asp)\
**Post date:** [August 20, 2019, 6:38am UTC](https://discuss.elastic.co/t/kubernetes-labels-are-missing-in-pod-and-container-metricsets/195505/3 "2019-08-20T06:38:23Z")

</div>

@pmercado thanks for your reply.

I am using following workaround now:  
ship all metricbeat probes to logstash and copy all fields below \_module to kubernetes root.

Details can be found here. It is not as generic as it should, but it is the fastest workaround which works for me.

> [@Which ways to copy subfields of kubernetes.container.\_module.labels.\* to kubernetes.lables.\*?](https://discuss.elastic.co/t/which-ways-to-copy-subfields-of-kubernetes-container-module-labels-to-kubernetes-lables/195546/5):
>
> mutate+copy is a no-op if a field does not exist, so you can compress this down to mutate { copy =\> { "[kubernetes][container][\_module][labels]" =\> "[kubernetes][labels]" "[kubernetes][container][\_module][namespace]" =\> "[kubernetes][namespace]" "[kubernetes][container][\_module][node]" =\> "[kubernetes][node]" "[kubernetes][container][\_module][pod]" =\> "[kubernetes][pod]" "[kubernetes][pod][\_module][labels]" =\> "[kubern…

---

_[View the full topic](https://discuss.elastic.co/t/kubernetes-labels-are-missing-in-pod-and-container-metricsets/195505)._
