Two node cluster - master assign

Hello all,

I have a two-node cluster, with node01 designated as master:

node.roles: [ master, data, ingest ]

node02 only has

node.roles: [ data, ingest ]

In order to switch the master node, can I just simply move the master tag from node01 to node02, restart both nodes and be done with it?

What would be the appropriate way to do so?

Thanks,
Oscar

You don't switch, with a 2 node cluster only one can be the master node.

That's what I want to achieve. Maintain only one master node, which would be 02 instead of 01. I haven't found anything in the documentation related to this tag movement between nodes.

Because this is not recommended for production nor officially supported.

A 2 node cluster is not resilient and can only have one node as master, so it does not make sense to switch a master node in this configuration.

If your cluster is running without any issue and is green, it may work to shutdown both nodes, change the role, and start them again, but you would need to test it yourself.

Also, make sure you have a backup in the case something goes wrong.

Are you looking to change the master node once just now or are you looking to make this change in case there are any issues with the master node?

Which version of Elasticsearch are you using?

1 Like

Hi Christian,

Version is 8.1.2

Node01 is older than 02, and we'd like to have the master on 02 for that (node01 might get retired sooner than 02).

Best,
Oscar

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