# Convert cluster to single node

**URL:** <https://discuss.elastic.co/t/convert-cluster-to-single-node/273368>\
**Category:** Elasticsearch\
**Created:** [May 19, 2021, 7:04am UTC](https://discuss.elastic.co/t/convert-cluster-to-single-node/273368 "2021-05-19T07:04:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![macho](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/macho/32/88940_2.png) [@macho](https://discuss.elastic.co/u/macho)\
**Post date:** [May 19, 2021, 7:04am UTC](https://discuss.elastic.co/t/convert-cluster-to-single-node/273368/1 "2021-05-19T07:04:19Z")

</div>

Sorry for probably a stupid question, but I am relatively new to elasticsearch.

My Problem is, I have a running cluster on three different machines.  
As this machines were never on the limit we want to use (at least) one of the machines for different purposes.  
I can find questions like howto change from single-node to cluster, but I cannot find the other way.

So my question is can I just "switch off" the machine?  
Is there any way to convert a cluster into a single-node?  
Or a way to migrate the "to be switched off" node to one of the remaining machines ?  
Can anyone give me a hint to a place where the howto do "this" is described?  
thanks a lot

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [May 19, 2021, 7:30am UTC](https://discuss.elastic.co/t/convert-cluster-to-single-node/273368/2 "2021-05-19T07:30:25Z")

</div>

You can try as follow :

- Make sure all indices are having 0 replicas
- Stpp node 3 and check shards have been re allocated to node 1 & node 2
- Stop node 2 and check shards have been re allocated to node 1
- Update node 1 config (mainly discovery.seed\_hosts & cluster.initial\_master\_nodes)
- Restart node 1  
....

---

<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:** [May 19, 2021, 7:40am UTC](https://discuss.elastic.co/t/convert-cluster-to-single-node/273368/3 "2021-05-19T07:40:02Z")

</div>

Note that in that case if anything goes wrong with your single node, you won't have any replication anywhere and you will need to rebuild the indices from scratch.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 19, 2021, 7:55am UTC](https://discuss.elastic.co/t/convert-cluster-to-single-node/273368/4 "2021-05-19T07:55:40Z")

</div>

> [@ylasri](#):
>
> - Update node 1 config (mainly discovery.seed\_hosts & cluster.initial\_master\_nodes)

You must **never** update `cluster.initial_master_nodes`. Since this cluster is already running this [setting shouldn't even be present any more](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#initial_master_nodes).

---

<div class="post-metadata">

**Author:** ![macho](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/macho/32/88940_2.png) [@macho](https://discuss.elastic.co/u/macho)\
**Post date:** [May 19, 2021, 8:00am UTC](https://discuss.elastic.co/t/convert-cluster-to-single-node/273368/5 "2021-05-19T08:00:42Z")

</div>

Many thanks for the suggestions.

So I first have to find out point 1:  
Make sure all indices are having 0 replicas 😉

Is it maybe possible to start a second instance on the master node to have 2 nodes on one machine and 1 on another to keep the cluster intact? Or is this not suggested?

---

<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:** [May 19, 2021, 8:44am UTC](https://discuss.elastic.co/t/convert-cluster-to-single-node/273368/6 "2021-05-19T08:44:29Z")

</div>

> [@macho](#):
>
> Is it maybe possible to start a second instance on the master node to have 2 nodes on one machine and 1 on another to keep the cluster intact? Or is this not suggested?

This is not recommended and useless IMO. If the machine crashes it crashes.  
Just be aware that you are not protected anymore and if it's fine for your use case to have a failure during the time you need to rebuild your index then that's fine.

If your use case can't suffer from such outage, keep the architecture as it was until today.

---

<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:** [June 16, 2021, 8:44am UTC](https://discuss.elastic.co/t/convert-cluster-to-single-node/273368/7 "2021-06-16T08:44:43Z")

</div>

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