Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why kubernetes HA need odd number of master

Tags:

kubernetes

I have kubernetes HA environment with three masters. Just have a test, shutdown two masters(kill the apiserver/kcm/scheduler process), then only one master can work well. I can use kubectl to create a deployment successfully ,some pods were scheduled to different nodes and start. So can anyone explain why it is advised odd number of masters? Thanks.

like image 458
yangyang Avatar asked Jan 28 '23 00:01

yangyang


1 Answers

Because if you have an even number of servers, it's a lot easier to end up in a situation where the network breaks and you have exactly 50% on each side. With an odd number, you can't (easily) have a situation where more than one partition in the network thinks it has majority control.

like image 72
coderanger Avatar answered Jan 31 '23 07:01

coderanger