<p>From what I've read about Kubernetes, if the master(s) die, the workers should still be able to function as normal (<a href="https://stackoverflow.com/a/39173007/281469">https://stackoverflow.com/a/39173007/281469</a>), although no new scheduling will occur.</p>

<p>However, I've found this to not be the case when the master can also schedule worker pods. Take a 2-node cluster, where one node is a master and the other a worker, and the master has the taints removed:</p>

<p><a href="https://i.stack.imgur.com/QojGI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QojGI.png" alt="diagram"></a></p>

<p>If I shut down the master and <code>docker exec</code> into one of the containers on the worker I can see that:</p>

<pre><code>nc -zv ip-of-pod 80
</code></pre>

<p>succeeds, but</p>

<pre><code>nc -zv ip-of-service 80
</code></pre>

<p>fails half of the time. The Kubernetes version is v1.15.10, using iptables mode for kube-proxy.</p>

<p>I'm guessing that since the kube-proxy on the worker node can't connect to the apiserver, it will not remove the master node from the iptables rules.</p>

<p>Questions:</p>

<ol>
<li>Is it expected behaviour that kube-proxy won't stop routing to pods on master nodes, or is there something "broken"?</li>
<li>Are any workarounds available for this kind of setup to allow the worker nodes to still function correctly?</li>
</ol>

<p>I realise the best thing to do is separate the CP nodes but that's not viable for what I'm working on at the moment.</p>

<blockquote>
  <p>Is it expected behaviour that kube-proxy won't stop routing to pods on
  master nodes, or is there something "broken"? </p>
  
  <p>Are any workarounds
  available for this kind of setup to allow the worker nodes to still
  function correctly?</p>
</blockquote>

<p>The cluster master plays the role of decision maker for the various activities in cluster's nodes. This can include scheduling workloads, managing the workloads' lifecycle, scaling etc.. Each node is managed by the master components and contains the services necessary to run pods. The services on a node typically includes the kube-proxy, container runtime and kubelet. </p>

<p>The kube-proxy component enforces network rules on nodes and helps kubernetes in managing the connectivity among Pods and Services. Also, the kube-proxy, acts as an egress-based load-balancing controller which keeps monitoring the the kubernetes API server and continually updates node's iptables subsystem based on it.</p>

<p>In simple terms, the master node only is aware of everything and is in charge of creating the list of routing rules as well based on node addition or deletion etc. kube-proxy plays a kind of enforcer whereby it takes charge of checking with master, syncing the information and enforcing the rules on the list.</p>

<p>If the master node(API server) is down, the cluster will not be able to respond to API commands or deploy nodes.  If another master node is not available, there shall be no one else available who can instruct the worker nodes on change in work allocation and hence they shall continue to execute the operations that were earlier scheduled by the master until the time the master node is back and gives different instructions. Inline to it, kube-proxy shall also be unable to get the latest rules by sync up with master, however it shall not stop routing and shall continue to handle the networking and routing functionalities (uses the earlier iptable rules that were determined before the master node went down) that shall allow network communication to your pods provided all pods in worker nodes are still up and running.</p>

<p>Single master node based architecture is not a preferred deployment architecture for production. Considering that resilience and reliability is one of the major business goal of kubernetes, it is recommended as a best practice to have HA cluster based architecture to avoid single point of failure.</p>
