MicroK8s HA question around standby and spare node types

Hi All

Apologies if this query is already answered in the docs , but i couldn’t see it

I note from the docs that when MicroK8s is in an HA setup we have

  • voters: replicating the database, participating in leader election
  • standby: replicating the database, not participating in leader election
  • spare: not replicating the database, not participating in leader election

I have observed that if i join a fourth node to an existing HA cluster it is added as a standby which is fine and if one of the 3 voter nodes drops out of the cluster the standby is promoted to a voter and when the failed node , that was previously a voter , rejoins the cluster it joins as a standby

That is also fine and makes sense but my query is how does a node get added as a spare as i assumed if i added fifth node it would join the cluster as a spare but it doesn’t it also joins as a standby

This is with MicroK8s version 1.20

Where can i find information on how this flow should work and what the rules are on the joining node being a standby or a spare ?

Thanks

Simon

Hi @simonjd,

The node types are dictated by dqlite. There are 3 voters, 3 stand-by nodes and the rest are spare. As you add nodes to a cluster the first three become the voters, the next three are the stand-by ones.

You do not have direct control on the role of each node. You can however specify the failure domain each node is in and MicroK8s/dqlite will spread the voters and stand-bys properly.

Cheers

1 Like

Thanks for the clarification

Cheers