In K8s
I have 2 nodes(worker). I installed services using helm charts i.e. mongo , kafka , redis. On node1 there is 1 replica and on node2 there are 2 . So node1:1/1 and node2:2/2. So for avoiding failure or downtime, if i add 3rd node node3 one replica from node2 automatically go to node3. So there will be always 2nodesup . What concept will be used here. Explain be how its applicable and how to apply also.
Node1 Node2 Node3
1/1 2/2
For HA there shloud be always be 1/1 replica on every node if i add 3rd node ; from any node on which there are two replicas shloud shift to 3rd node.
Node1 Node2 Node3
1/1 1/1 1/1
if any of them falied it should transfer to another one which has enough resource to run that.After that 3rd node gets up again ;then that 2/2 replica sholud go back to that previous node automatically. how to do it what concept to be applied here.