# How to configure metricbeat k8s to use ssl connection to ES

**URL:** https://discuss.elastic.co/t/how-to-configure-metricbeat-k8s-to-use-ssl-connection-to-es/342538
**Category:** Beats
**Tags:** metricbeat
**Created:** [September 7, 2023, 3:50pm UTC](https://discuss.elastic.co/t/how-to-configure-metricbeat-k8s-to-use-ssl-connection-to-es/342538 "2023-09-07T15:50:11Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [September 7, 2023, 5:50pm UTC](https://discuss.elastic.co/t/how-to-configure-metricbeat-k8s-to-use-ssl-connection-to-es/342538/2 "2023-09-07T17:50:26Z")

</div>

Hi @Mihai-CMM  
You have to get the CA from when you created Elasticsearch and then make the CA available to metricbeat via mounts

Perhaps take a look at this post. I think this is a pretty good example

> [@Filebeat running on Kubernetes connected to Elasticsearch using SSL](https://discuss.elastic.co/t/filebeat-running-on-kubernetes-connected-to-elasticsearch-using-ssl/279946):
>
> I would like to use filebeat on Kubernetes and connect it to a secured Elasticsearch server, using certificates. I did a search to find how to do this but only found an un-answered related question. After some test I got it, so I will share my findings to help anybody else. These are the steps: Follow the original [documentation](https://www.elastic.co/guide/en/beats/filebeat/current/running-on-kubernetes.html) to download the yaml file. As shown on the documentation, update this file with the correct details about the Elasticsearch server: hostname, port, user and passw…

---

_[View the full topic](https://discuss.elastic.co/t/how-to-configure-metricbeat-k8s-to-use-ssl-connection-to-es/342538)._
