# What's the best practice to use metricbeat for prometeus protocol collection on Kubernetes cluster

**URL:** https://discuss.elastic.co/t/whats-the-best-practice-to-use-metricbeat-for-prometeus-protocol-collection-on-kubernetes-cluster/273096
**Category:** Beats
**Tags:** metricbeat
**Created:** [May 16, 2021, 1:04am UTC](https://discuss.elastic.co/t/whats-the-best-practice-to-use-metricbeat-for-prometeus-protocol-collection-on-kubernetes-cluster/273096 "2021-05-16T01:04:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![shoothzj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shoothzj/32/88813_2.png) [@shoothzj](https://discuss.elastic.co/u/shoothzj)
#### Post date: [May 16, 2021, 1:04am UTC](https://discuss.elastic.co/t/whats-the-best-practice-to-use-metricbeat-for-prometeus-protocol-collection-on-kubernetes-cluster/273096/1 "2021-05-16T01:04:54Z")

</div>

We are deploying metricbeat as a daemon set to collect vm、docker metrics. It works well.

If we want metricbeat to collect Pulsar、Flink(they are Deploy on k8s）'s prometheus metrics.

Currently, I found that metricbeat promtheus module only support config ip address, which can changed all the time.

I was wondering if it will be nice for metricbeat to support service discovery mechanism ?

Additional, StatefulSet on k8s can be supported by deploy a single metricbeat and config these domains on metricbeat. For statefulset, is this better or service discover better?

---

<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: [June 13, 2021, 3:05am UTC](https://discuss.elastic.co/t/whats-the-best-practice-to-use-metricbeat-for-prometeus-protocol-collection-on-kubernetes-cluster/273096/2 "2021-06-13T03:05:28Z")

</div>

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