<p>I have a 5 worker node and a master node in a kubernetes cluster. I want to add a new master in that cluster so that the cluster will be highly available. what could be the best approach to add a new master in a cluster? </p>

<p><a href="https://thenewstack.io/kubernetes-high-availability-no-single-point-of-failure/" rel="noreferrer">This article</a> helped me a lot with understanding how HA cluster looks like in real life, so I recommend to check it out first.</p>
<p>Here is a quote from <a href="https://kubernetes.io/docs/tasks/administer-cluster/highly-available-master/" rel="noreferrer">Kubernetes documentation</a> that describes creating HA cluster:</p>
<blockquote>
<h3>Starting an HA-compatible cluster To create a new HA-compatible cluster, you must set the following flags in your kube-up script:</h3>
<ul>
<li><p>MULTIZONE=true - to prevent removal of master replicas kubelets from zones different than the server's default zone. Required if you
want to run master replicas in different zones, which is recommended.</p>
</li>
<li><p>ENABLE_ETCD_QUORUM_READS=true - to ensure that reads from all API servers will return the most up-to-date data. If true, reads will be
directed to leader etcd replica. Setting this value to true is
optional: reads will be more reliable but will also be slower.</p>
</li>
</ul>
<p>Optionally, you can specify a GCE zone where the first master replica
is to be created. Set the following flag:</p>
<ul>
<li><p>KUBE_GCE_ZONE=zone - zone where the first master replica will run. The following sample command sets up a HA-compatible cluster in the
GCE zone europe-west1-b:</p>
<p>$ MULTIZONE=true KUBE_GCE_ZONE=europe-west1-b  ENABLE_ETCD_QUORUM_READS=true ./cluster/kube-up.sh</p>
</li>
</ul>
<p>Note that the commands above create a cluster with one master;
however, you can add new master replicas to the cluster with
subsequent commands.</p>
<h3>Adding a new master replica After you have created an HA-compatible cluster, you can add master replicas to it. You add master replicas by</h3>
<p>using a kube-up script with the following flags:</p>
<ul>
<li><p>KUBE_REPLICATE_EXISTING_MASTER=true - to create a replica of an existing master.</p>
</li>
<li><p>KUBE_GCE_ZONE=zone - zone where the master replica will run. Must be in the same region as other replicas’ zones.</p>
</li>
</ul>
<p>You don’t need to set the MULTIZONE or ENABLE_ETCD_QUORUM_READS flags,
as those are inherited from when you started your HA-compatible
cluster.</p>
<p>The following sample command replicates the master on an existing
HA-compatible cluster:</p>
<p>$ KUBE_GCE_ZONE=europe-west1-c KUBE_REPLICATE_EXISTING_MASTER=true
./cluster/kube-up.sh</p>
</blockquote>
<p>You can also find these resources useful:</p>
<ul>
<li><a href="https://github.com/salmanb/Kubernetes-HA-on-baremetal" rel="noreferrer">Setup an HA kubernetes cluster on Bare Metal</a></li>
<li><a href="https://medium.com/@bambash/ha-kubernetes-cluster-via-kubeadm-b2133360b198" rel="noreferrer">HA Kubernetes with Kubeadm</a></li>
<li><a href="https://elastisys.com/2018/01/25/setting-highly-available-kubernetes-clusters/" rel="noreferrer">On setting up highly available Kubernetes clusters</a></li>
<li><a href="http://www.tothenew.com/blog/how-to-setup-kubernetes-master-ha-on-centos/" rel="noreferrer">How to Setup Kubernetes Master HA on CentOS?</a></li>
<li><a href="https://www.youtube.com/watch?v=ppY9cqTvBVE" rel="noreferrer">Managing HA Kubernetes clusters</a> (Rancher Labs meetup video)</li>
</ul>
