Getting master_not_discovered_exception from node

Welcome!

What do you mean? "Data nodes"?
That's the default behavior of Elasticsearch so you basically do not need to do anything.

Well. I'd recommend following instead the official documentation. And start from:Set up Elasticsearch | Elasticsearch Guide [8.11] | Elastic

Also the easiest way to have a cluster up and running is by clicking on cloud.elastic.co and start a cluster in few minutes.

Better to share the full logs so we might tell. Also the elasticsearch.yml files.

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

A wild guess is: Important Elasticsearch configuration | Elasticsearch Guide [8.11] | Elastic