# Generate Certificates For TLS Encryption for cluster in Kubernetes

**URL:** <https://discuss.elastic.co/t/generate-certificates-for-tls-encryption-for-cluster-in-kubernetes/238577>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [June 25, 2020, 12:31am UTC](https://discuss.elastic.co/t/generate-certificates-for-tls-encryption-for-cluster-in-kubernetes/238577 "2020-06-25T00:31:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elk\_follower](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@elk\_follower](https://discuss.elastic.co/u/elk_follower)\
**Post date:** [June 25, 2020, 12:31am UTC](https://discuss.elastic.co/t/generate-certificates-for-tls-encryption-for-cluster-in-kubernetes/238577/1 "2020-06-25T00:31:16Z")

</div>

Hi There, i have a elastic 7.7.1 cluster with following architecture:

- Ingest nodes - These are kubernetes deployment with a service called elastic-client running on port 9200
- Data nodes - These are kubernetes stateful set
- Master nodes - These are again kubernetes stateful set

Now i need to enable TLS and HTTP encryption for this cluster for which i need to generate certificates. I'm referring to [https://www.elastic.co/guide/en/elasticsearch/reference/7.x/encrypting-communications-certificates.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/encrypting-communications-certificates.html) to generate using --in \<input\_file\> option.

This file should have all the nodes and their dns names.

So my question how this would work for my ingest nodes which are kubernetes deployment as their name would change every time scale up or down.

---

<div class="post-metadata">

**Author:** ![elk\_follower](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@elk\_follower](https://discuss.elastic.co/u/elk_follower)\
**Post date:** [July 1, 2020, 5:00pm UTC](https://discuss.elastic.co/t/generate-certificates-for-tls-encryption-for-cluster-in-kubernetes/238577/2 "2020-07-01T17:00:13Z")

</div>

Just to close this, I changed the ingest nodes to be stateful set as well. Which made it easier.

---

<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:** [July 29, 2020, 5:00pm UTC](https://discuss.elastic.co/t/generate-certificates-for-tls-encryption-for-cluster-in-kubernetes/238577/3 "2020-07-29T17:00:14Z")

</div>

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