<p>I am new to the Kubernetes and cluster.</p>

<p>I would like to bring up an High Availability Master Only Kubernetes Cluster(Need Not to!).  </p>

<p>I have the 2 Instances/Servers running Kubernetes daemon, and running different kind of pods on both the Nodes. </p>

<p>Now I would like to somehow create the cluster and if the one of the host(2) down, then all the pods from that host(2) should move to the another host(1).</p>

<p>once the host(2) comes up. the pods should float back. </p>

<p>Please let me know if there is any way i can achieve this?</p>

user1830237
<p>Since your requirement is to have a 2 node master-only cluster <strong>and</strong> also have HA capabilities then unfortunately there is no straightforward way to achieve it.</p>
<p>Reason being that a 2 node master-only cluster deployed by kubeadm has only 2 etcd pods (one on each node). This gives you no <a href="https://etcd.io/docs/v2/admin_guide/#optimal-cluster-size" rel="nofollow noreferrer">fault tolerance</a>. Meaning if one of the nodes goes down, etcd cluster would lose quorum and the remaining k8s master won't be able to operate.</p>
<p>Now, if you were ok with having an <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/high-availability/#external-etcd-nodes" rel="nofollow noreferrer">external etcd cluster</a> where you can maintain an odd number of etcd members then yes, you can have a 2 node k8s cluster and still have HA capabilities.</p>
