How are highly available microk8s clusters set up?

I’m trying to understand high availability, and here it looks like worker nodes are always separate from the control plane and the etcd instances.

But when I look at microk8s, it seems like they only require 3 nodes in total to achieve HA. Is this “cheating”? Do they run the control plane, etcd and worker processes all on the same node over all 3 nodes, or how do they manage this?

It looks really tempting to me to use this since it requires half or even athird of the nodes to achieve HA compared to the examples in the link above (depending on stacked vs separating control plane/etcd).

The questions I hope to get answered are:

  1. How does microk8s manage to achieve the same goal of HA with half of the nodes?
  2. What are the drawbacks of doing it the “microk8s way”?

I think the microk8s strategy here seems simpler and more homogenous, but I am unsure how it really works.

Thanks for any answers :slight_smile:

Hi @hannesknutsson

My 2 cents. There is no magic involved here. :slight_smile: It is similar to the “stack” as described in the kubernetes documentation. What differentiates MicroK8s from the vanilla Kubernetes, is that it uses Dqlite as it’s backend storage and not etcd. Dqlite turns sqlite to a distributed database. The way dqlite also uses raft consensus protocol to achieve a resilient system (just like any distributed system using raft consensus).

IMHO, you can also achieve smaller node footprints if you intend to have your workload also run on the control plane, regardless if its vanilla kubernetes or MicroK8s.

Depending on how demanding your workloads are, it may or may not affect the control plane.