k8s HA multi-master requirements for number of hosts?

9/13/2019

I want to write tests for HA k8s with multi-master setup.

I have read at this answer it is possible to allow user pods to be scheduled to a master node. I am bit hazy if it is ok to do this for multiple (or rather all) my masters.

I've read at k8s HA docs ...

For both methods you need this infrastructure:
Three machines that meet kubeadm’s minimum requirements for the masters
Three machines that meet kubeadm’s minimum requirements for the workers

Does this mean

  • minimum 3 hosts in total (i.e. sensible to run/test with each host as combined master and worker)?
  • minimum 6 hosts for testing, i.e. 3 x masters and 3 x workers ?
-- k1eran
kubernetes

2 Answers

9/13/2019

Actually, you can do everything you want with the only one node cluster setup. It could be only one schedulable master and it could work under some kind of frontend http balancer. Your can make your test communicate with the APIserver via frontend HA, so, your test will be totally independent from the cluster nodes count in fact

-- Konstantin Vustin
Source: StackOverflow

9/13/2019

yes, you can schedule user work loads on masters. You need to taint the masters to allow workloads to be scheduled. user the below command to taint masters

kubectl taint nodes --all node-role.kubernetes.io/master-
-- P Ekambaram
Source: StackOverflow