<p>I was going through the differences between Swarm vs K8s one of the <strong>cons of Swarm is that it has limited fault tolerance functionality</strong>. How does K8s achieve fault tolerance, is it via  K8s multi-master. Please share your inputs</p>

Zaks
<p>Yes! In order to achieve Kubernetes fault-tolerance is recommended to have multiples Control Planes (master) nodes and if you are running in cloud providers multiples availability zones are recommended.</p>

<blockquote>
  <p>The Control Plane’s components make global decisions about the cluster (for example, scheduling), as well as detecting and responding to cluster events (for example, starting up a new <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/" rel="nofollow noreferrer">pod</a> when a deployment’s <code>replicas</code> field is unsatisfied).</p>
</blockquote>

<p>Basically, the control plane is composed by theses components: </p>

<p><a href="https://kubernetes.io/docs/concepts/overview/components/#kube-apiserver" rel="nofollow noreferrer">kube-apiserver</a> - Exposes the Kubernetes API. Is the front for Kubernetes control plane</p>

<p><a href="https://kubernetes.io/docs/concepts/overview/components/#etcd" rel="nofollow noreferrer">etcd</a> - Key/Value Kubernetes' backing store for cluster data</p>

<p><a href="https://kubernetes.io/docs/concepts/overview/components/#kube-scheduler" rel="nofollow noreferrer">kube-scheduler</a> - Responsible for watches for newly created pods with no assigned node, and selects a node for them to run on</p>

<p><a href="https://kubernetes.io/docs/concepts/overview/components/#kube-controller-manager" rel="nofollow noreferrer">kube-controller-manager</a> - One of controller responsibility is maintain the correct number of pods for every replication  controller, populate endpoints objects and responding when nodes go down.</p>

<p><a href="https://kubernetes.io/docs/concepts/overview/components/#cloud-controller-manager" rel="nofollow noreferrer">cloud-controller-manager</a> - Interact with the underlying cloud providers, </p>

<p>Every cluster need 1 worker nodes at least, the work nodes is responsible to run your workloads.</p>

<blockquote>
  <p>Here’s the diagram of a Kubernetes cluster with all the components tied together:</p>
</blockquote>

<p><a href="https://i.stack.imgur.com/fhqnj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fhqnj.png" alt="enter image description here"></a></p>

<p>For more info see <a href="https://kubernetes.io/docs/concepts/overview/components/" rel="nofollow noreferrer">here</a></p>
