Why does my single-node RKE2 leader keep failing and switching?

0
0
Asked By TechExplorer42 On

Hey folks! I'm currently working on an RKE2 cluster with just a single server node that acts as the leader. I have the following line in my `config.yaml` file: `server: https://:9345`. However, I've been facing an issue where, after some time, the leader node stops responding. I get this error message: `Failed to validate connection to cluster at https://127.0.0.1:9345`, along with `rke2-server not listening on port 6443`. This problem leads the agent and other components to try connecting to a different node, making them think the leader is unavailable. Since I don't have HA set up yet and there's no VIP or load balancer, I'm puzzled as to why the leader keeps changing when there's only one node. Any advice on how to stabilize the leader until I can transition to HA mode? Thanks!

3 Answers

Answered By DataDynamo71 On

You're right, that line isn’t necessary for a single-node RKE2 cluster. It's only required for joining additional nodes to the cluster, where the `server` option should point to an already functional RKE2 control node. So just keep it simple for now with your single node!

Answered By NodeNerd88 On

Quick question for you — where are you seeing those specific messages? I think `rke2-server not listening on port 6443` isn’t really logged by rke2. Also, that's related to the apiserver, not the supervising process, which is why it might be confusing.

Answered By CloudStrider99 On

It looks like that line you have is generally meant for the control plane when using multiple nodes. In a single-node setup, that configuration isn't necessary because once you introduce additional nodes, they will utilize the load balancer's IP. When you eventually move to HA, you'll leverage a VIP or LB IP across your control nodes. This should help with leader election among multiple nodes. Hope this clarifies things!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.