Kubernetes master replicate

3/19/2018

I have a Raspbian pi cluster with 4 pi's where i run a kubernetes cluster on it( 1 master 3 nodes). For high availability reasons i already set up that the default pod down time decreases from 5 minutes to 30 seconds and other configurations so that the hart beat time is ass low as possible. As i am looking for more high availability solutions. I've been stuck at the problem of a replicate master pi. Is it possible to have 2 masters where the back up master is also a node. As i only have 4 pi's i'm wondering if that without adding a new pi to be the master replica i can use one of my nodes as a back up master.

-- achahbar
kubernetes
kubernetes-health-check
master
replication

1 Answer

3/19/2018

Based on official documentation you need to have at least 3 masters in your cluster. Also, you need to have 3 nodes for Etcd cluster, because of quorum. Here is from its documentation:

An etcd cluster needs a majority of nodes, a quorum, to agree on updates to the cluster state. For a cluster with n members, quorum is (n/2)+1.

But, if you have no high load, you can also use your masters for schedule pods there:

kubectl taint node $masternodename node-role.kubernetes.io/master:NoSchedule

Be careful with scheduling of pods which will be running on the master nodes and use limits for them.

-- Anton Kostenko
Source: StackOverflow