Hi All,
I have a 2 node K3s master with single node 8c/12Gb postgres instance, with 35 agents. I'm running this setup in production since 2 years now and have not faced any issues like this before.
I'm seeing k3s server getting restarted every now and then. It started happening since two days ago & it is continuing to restart on its own with below error
Copy code
level=fatal msg="leaderelection lost for k3s"
b
best-appointment-66450
09/09/2025, 5:33 AM
I'm sorry if I'm being too simplistic, but if there's a leaderelection, isn't that something better handled by 3 nodes rather than two?
f
future-horse-85191
09/09/2025, 5:43 AM
It depends if it's a HA cluster with external DB as quorum and datastore (https://docs.k3s.io/datastore/ha)
But if it's etcd then three node is would be the way to go https://docs.k3s.io/datastore/ha-embedded
But since Pavan is refering to a singe node postgres I'm more or less convinced they are running a two node HA k3s cluster with external DB
b
best-appointment-66450
09/09/2025, 5:52 AM
Indeed, but the message is about a leaderelection in k3s, which made me wonder if the two node approach could be an issue. I would be at a loss to explain why it should suddenly be so, other than a failure of some sort within one node which one might expect to show up in other ways. I would be tempted to add another k3s node just to test, if that's easily done. Said with all the authority of someone clutching at straws.