Hi my k3s peeps! I want to enable HA on a two nod...
# k3s
s
Hi my k3s peeps! I want to enable HA on a two node cluster. Is it possible to run MySQL inside the the cluster using a MySQL operator, and then still add other master nodes at that point? Or does MySQL need to be run outside of the cluster to solve some chicken-or-the-egg-first type problems?
c
you want to have the cluster run against a sql database, that is hosted inside the cluster? How would you get the database running before the cluster is up, if it is hosted inside the cluster?
s
This is why I'm asking the question 🙂 Not sure if there was some mechanism where you could start with the embedded sqlite, and then specify a new database (hosted inside itself) and it would work. If you guys have never heard of it then my suspicions were correct. I googled and LLM'd pretty extensively prior to this, just wanted to make sure we're not missing some easier management of a database by using an operator!
c
nooope
external SQL really only makes sense if you already have a highly available SQL service available in your environment, or from a cloud service provider - for example RDS MySQL.
If you don’t have that, then you should be using a 3-node cluster with embedded etcd.
s
We are running two edge nodes, which is why we can't use etcd
So limited resources, and hosted in a customer env, etc.
c
Even with active/active SQL you still really want a 3rd node to act as a witness for proper HA
s
We have hundreds of clusters, and so far, they're all the same. It would be a huge and immense effort to deploy a third. And cost for those customers...
c
There isn’t really a good solution for proper two-node replicated HA
s
Yeah... We are coming from a KeepaliveD / HAProxy env. So obviously not 1:1, but k8s offers such a better environment for deploying services!
a
s
I was literally just about to ask if anybody has seen people use Marmot, which uses NATS underneath I believe.
@acoustic-addition-45641 have you found any actual examples of how to use NATS for kine, and therefore, k3s? I haven't found much in a HA sense for that...
c
no, nats got abandoned by the synadia team
they keep claiming they will update it and make it work, but the kine nats backend is broken
a
Sadness.
s
That is, it seems like it could have been a pretty simple drop in solution.