# Need Guidance: Setting Up Elasticsearch Cluster and Integrating with Spring Boot Application

**URL:** <https://discuss.elastic.co/t/need-guidance-setting-up-elasticsearch-cluster-and-integrating-with-spring-boot-application/372285>\
**Category:** Elasticsearch\
**Created:** [December 20, 2024, 7:06pm UTC](https://discuss.elastic.co/t/need-guidance-setting-up-elasticsearch-cluster-and-integrating-with-spring-boot-application/372285 "2024-12-20T19:06:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zikou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zikou/32/140193_2.png) [@Zikou](https://discuss.elastic.co/u/Zikou)\
**Post date:** [December 20, 2024, 7:06pm UTC](https://discuss.elastic.co/t/need-guidance-setting-up-elasticsearch-cluster-and-integrating-with-spring-boot-application/372285/1 "2024-12-20T19:06:06Z")

</div>

Hi everyone,

I'm a DevOps intern, and my team is planning to integrate Elasticsearch with our application (built using Spring Boot). I've been tasked with setting up an Elasticsearch cluster and configuring it for the integration.

Since this is my first time working with Elasticsearch, I could really use your help to understand:

1. **Setting up an Elasticsearch Cluster:**
2. 
  - What are the steps to set up a basic Elasticsearch cluster (single-node or multi-node)?

- Are there any best practices or configurations I should be aware of for production readiness?

1. **Configuration and Access Control:**
2. 
  - What configurations should I prioritize (e.g., memory settings, cluster settings, security settings like TLS, etc.)?

- How can I secure the cluster to ensure only the Spring Boot application has access to it?

1. **Integration with Spring Boot:**
2. 
  - What endpoint(s) should I provide to the development team for integrating Elasticsearch with Spring Boot?

- Are there any additional steps I should communicate to the dev team for a smooth integration?

I appreciate any guidance, resources, or examples you can share to help me get started.

Thank you in advance for your help!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 20, 2024, 9:17pm UTC](https://discuss.elastic.co/t/need-guidance-setting-up-elasticsearch-cluster-and-integrating-with-spring-boot-application/372285/2 "2024-12-20T21:17:24Z")

</div>

Hey

I'd use docker compose or just docker depending on what you want to do.

> What are the steps to set up a basic Elasticsearch cluster (single-node or multi-node)?

See [Install Elasticsearch with Docker | Elasticsearch Guide [8.17] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-compose-file)

> Are there any best practices or configurations I should be aware of for production readiness?

I'd start from here: [Important system configuration | Elasticsearch Guide [8.17] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/system-config.html)

> How can I secure the cluster to ensure only the Spring Boot application has access to it?

The default docker compose example has TLS, security...

> What endpoint(s) should I provide to the development team for integrating Elasticsearch with Spring Boot?

Something like [https://localhost:9200](https://localhost:9200).

Some useful resources:

> **[RAG made easy with Spring AI + Elasticsearch - Elasticsearch Labs](https://www.elastic.co/search-labs/blog/java-rag-spring-ai-es)**
>
> Customizing your AI chatbot experience with private data

> **[GitHub - dadoonet/elasticsearch-java-client-demo: Elasticsearch Client Java Sample project](https://github.com/dadoonet/elasticsearch-java-client-demo)**
>
> Elasticsearch Client Java Sample project

HTH

---

<div class="post-metadata">

**Author:** ![Zikou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zikou/32/140193_2.png) [@Zikou](https://discuss.elastic.co/u/Zikou)\
**Post date:** [December 20, 2024, 10:28pm UTC](https://discuss.elastic.co/t/need-guidance-setting-up-elasticsearch-cluster-and-integrating-with-spring-boot-application/372285/3 "2024-12-20T22:28:02Z")

</div>

@dadoonet I want to deploy the elasticsearch as multinode in production  
I think it is not good to deploy it as docker compose for production  
so can give steps to set up cluster for production  
also for multi node what should endpoint should I give to dev (since there is multi node)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 22, 2024, 5:03pm UTC](https://discuss.elastic.co/t/need-guidance-setting-up-elasticsearch-cluster-and-integrating-with-spring-boot-application/372285/4 "2024-12-22T17:03:27Z")

</div>

The easiest way to be up and running is to use [cloud.elastic.co](http://cloud.elastic.co) with 2 options:

- Serverless: we do everything and you just send data
- Elasticsearch service: you define what type of architecture you want, like hot, warm, cold nodes...

If you want to run everything within your own datacenter, you can read important information from this page: [Get ready for production | Elasticsearch Guide [8.17] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/scalability.html)

---

<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:** [January 19, 2025, 5:04pm UTC](https://discuss.elastic.co/t/need-guidance-setting-up-elasticsearch-cluster-and-integrating-with-spring-boot-application/372285/5 "2025-01-19T17:04:20Z")

</div>

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