Kubernetes High Availability Cluster: No Single Point of failure
The basic Kubernetes architecture is described in the previous post.
With Kubernetes, we are trying to achieve more reliability to our architecture. But what about the cluster components. So suppose, if we talk about the api-server, if we have only one api-server and if that node crashes, then the complete cluster will fail.
So, in order to make the cluster components redundant, we need to ensure each component have their redundancies.
Basically with high availability, we have two types of cluster :
a) Stacked etcd:
Basically, for any type of cluster(either stacked/external), we need at least 3 etcd instances(since it uses the concept of quoram).
In this cluster, etcd storage is stacked on top of the other components of cluster. Here the local etcd member talks to only local api-server. api-server is exposed to worker-nodes via Load Balancers(like HAProxy).
This approach is simpler to manage than external etcd but it comes with a cost. Suppose if one master(control-plane) node goes down all components including etcd goes down.
Therefore minimum three instances of control-plane nodes are needed.
b) External etcd:
In this type, etcd is setup on different nodes as compared to other components.
Similar to the above-stacked cluster here also, we have control plane nodes like api-server, controller-manager, scheduler are on same nodes with api-server exposed via Load Balancer. But the difference is that etcd is not present on the same nodes. They are present on different nodes and now etcd nodes in the cluster can communicate with each api-server.
This approach decouples the control plane and etcd member. It therefore provides an HA setup where losing a control plane instance or an etcd member has less impact and does not affect the cluster redundancy as much as the stacked HA topology.
However, this approach requires twice the number of hosts as the stacked HA topology. A minimum of three hosts for control plane nodes and three hosts for etcd nodes are required for an HA cluster.
Comments
Post a Comment