# Filebeat and metricbeat as daemonset with eck

**URL:** <https://discuss.elastic.co/t/filebeat-and-metricbeat-as-daemonset-with-eck/210935>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [December 6, 2019, 7:16pm UTC](https://discuss.elastic.co/t/filebeat-and-metricbeat-as-daemonset-with-eck/210935 "2019-12-06T19:16:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ikaposi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikaposi/32/58438_2.png) [@ikaposi](https://discuss.elastic.co/u/ikaposi)\
**Post date:** [December 6, 2019, 7:16pm UTC](https://discuss.elastic.co/t/filebeat-and-metricbeat-as-daemonset-with-eck/210935/1 "2019-12-06T19:16:15Z")

</div>

Hi,

I've deployed an eck elastic cluster and now I'd like to enable the metricbeat and filebeat daemonsets.  
The daemonsets are however complaining the x509 certificate is not trusted. I'd prefer to somehow reference the CA utilizing the already defined secrets by ECK, but I could use some help with that. I'm not quite sure what the best approach is here. Anybody already got this working?

---

<div class="post-metadata">

**Author:** ![sebgl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebgl/32/48702_2.png) [@sebgl](https://discuss.elastic.co/u/sebgl)\
**Post date:** [December 6, 2019, 7:32pm UTC](https://discuss.elastic.co/t/filebeat-and-metricbeat-as-daemonset-with-eck/210935/2 "2019-12-06T19:32:19Z")

</div>

Hey @ikaposi,

This should help: [https://github.com/elastic/cloud-on-k8s/tree/master/config/recipes/beats](https://github.com/elastic/cloud-on-k8s/tree/master/config/recipes/beats).  
It contains manifests for Filebat and Metricbeat as deaemonsets to connect to an ECK-managed Elasticsearch with the existing certificates mounted in.

---

<div class="post-metadata">

**Author:** ![ikaposi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikaposi/32/58438_2.png) [@ikaposi](https://discuss.elastic.co/u/ikaposi)\
**Post date:** [December 6, 2019, 7:54pm UTC](https://discuss.elastic.co/t/filebeat-and-metricbeat-as-daemonset-with-eck/210935/3 "2019-12-06T19:54:26Z")

</div>

Not only was that the perfect solution for my question, it also addressed my follow up questions (how to use variables only once and how to mount them, as I am still a k8s noob).

Huge thanks (this status took my half a day 🙂 )

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/6/b6d9d2603e693d1ea6161268f6af3cdae19ae507.png)

---

<div class="post-metadata">

**Author:** ![Sriharsha\_Kalluru](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sriharsha_kalluru/32/47498_2.png) [@Sriharsha\_Kalluru](https://discuss.elastic.co/u/Sriharsha_Kalluru)\
**Post date:** [June 17, 2020, 7:16am UTC](https://discuss.elastic.co/t/filebeat-and-metricbeat-as-daemonset-with-eck/210935/4 "2020-06-17T07:16:41Z")

</div>

THis saved my day. Thank you very much.

---

<div class="post-metadata">

**Author:** ![sebgl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebgl/32/48702_2.png) [@sebgl](https://discuss.elastic.co/u/sebgl)\
**Post date:** [September 3, 2020, 7:20am UTC](https://discuss.elastic.co/t/filebeat-and-metricbeat-as-daemonset-with-eck/210935/5 "2020-09-03T07:20:01Z")

</div>

ECK now has [official support for Beats](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-beat.html) (filebeat and metricbeat included).  
It simplifies the setup and maintenance a lot 🙂

---

<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:** [November 4, 2022, 7:36am UTC](https://discuss.elastic.co/t/filebeat-and-metricbeat-as-daemonset-with-eck/210935/6 "2022-11-04T07:36:27Z")

</div>


