Java version update in running ES cluster

Hi,
I have 3 nodes running in ES cluster in production. There is little difference in jre version on those 3 machines.
Now if I want to change version on master node then what is better way to change it with minimum data loss?
I think I have to stop the cluster till I update java.
can I make some other node master and stop the old master? Is there any risk of shard failure or corruption of data?

Please guide on this.

br,
Sunil

What is your current master configuration? Do you have a single master-eligible node? Is every node master-eligible? Do you have discovery.zen.minimum_master_nodes set?

Hi,
Below is configuration on 3 nodes. One is master, others are data. discovery.zen.minimum_master_nodes is set to 1 onmaster node and commented on data nodes.

Host1-master
node.master: true
node.data: true
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping.unicast.hosts: ["host1-ip-addr:9300"]

Host2-data
node.master: false
node.data: true
#discovery.zen.minimum_master_nodes: 1
#discovery.zen.ping.unicast.hosts: ["host:port"]

Host3-data
node.master: flase
node.data: true
#discovery.zen.minimum_master_nodes: 1
#discovery.zen.ping.unicast.hosts: ["host:port"]

br,
Sunil

Given your current configuration, it is not possible to upgrade the JVM without some downtime or risking split brain or data loss. While there are ways to do it with very minimal downtime, if it is at all an option for you to just take a maintenance window and shut everything down that would be my recommendation. It's far better to do these sorts of operations in low-stress situations. You should add two more master-eligible nodes if you can and set discovery.zen.minimum_master_nodes to 2 so that in the future you can get by without taking downtime.

Thank you very much Jason!! I will do that way.