# Metricbeat Kubernetes Module has JSON marshal error

**URL:** <https://discuss.elastic.co/t/metricbeat-kubernetes-module-has-json-marshal-error/259900>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [December 30, 2020, 4:18pm UTC](https://discuss.elastic.co/t/metricbeat-kubernetes-module-has-json-marshal-error/259900 "2020-12-30T16:18:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthew-mcdermott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matthew-mcdermott/32/78061_2.png) [@matthew-mcdermott](https://discuss.elastic.co/u/matthew-mcdermott)\
**Post date:** [December 30, 2020, 4:18pm UTC](https://discuss.elastic.co/t/metricbeat-kubernetes-module-has-json-marshal-error/259900/1 "2020-12-30T16:18:07Z")

</div>

I am using metricbeat's kubernetes module and have come across what I believe is a bug. It is related to this issue: [https://github.com/elastic/beats/issues/19475](https://github.com/elastic/beats/issues/19475).

I am not a Go developer, but seems like a fix might be just as easy as declaring the effected fields as a string in this file? [https://github.com/elastic/beats/blob/master/metricbeat/module/kubernetes/types.go](https://github.com/elastic/beats/blob/master/metricbeat/module/kubernetes/types.go)

The solution I am proposing comes to me from reading the docs on json.Marshal here: [https://golang.org/pkg/encoding/json/#Marshal](https://golang.org/pkg/encoding/json/#Marshal).

Is anyone else running into this issue by any chance or does anyone else have any input by any chance?

---

<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:** [January 4, 2021, 1:26pm UTC](https://discuss.elastic.co/t/metricbeat-kubernetes-module-has-json-marshal-error/259900/2 "2021-01-04T13:26:58Z")

</div>

Hi!

There is already a fix on the way linked to the issue you report!

Thanks!

---

<div class="post-metadata">

**Author:** ![matthew-mcdermott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matthew-mcdermott/32/78061_2.png) [@matthew-mcdermott](https://discuss.elastic.co/u/matthew-mcdermott)\
**Post date:** [January 4, 2021, 2:48pm UTC](https://discuss.elastic.co/t/metricbeat-kubernetes-module-has-json-marshal-error/259900/3 "2021-01-04T14:48:27Z")

</div>

Thank you!

---

<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:** [February 1, 2021, 4:48pm UTC](https://discuss.elastic.co/t/metricbeat-kubernetes-module-has-json-marshal-error/259900/4 "2021-02-01T16:48:35Z")

</div>

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