Troubleshooting a 3-Node HA k3s Setup on Ubuntu 24

0
2
Asked By TechWhiz23 On

I've been struggling for hours trying to get my 3-node HA k3s setup working on fresh installs of Ubuntu 24 on bare metal, and it seems like it should be straightforward. I followed a guide I found online but ran into problems when trying to get additional nodes to join the cluster.

The commands I used to set up the first node are:
1. `curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--write-kubeconfig-mode=644 --disable traefik" K3S_TOKEN=k3stoken sh -s - server --cluster-init`
2. For the other nodes, I tried: `curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--write-kubeconfig-mode=644 --disable traefik" K3S_TOKEN=k3stoken sh -s - server --server https://{hostname/ip}:6443`

However, those nodes don't show up when I run `kubectl` on the first node. I've attempted both hostname and IP for the server connection. I verified the token but it's not working either.

Interestingly, if I set up a basic configuration (without HA), the nodes connect just fine, so it's clearly not a networking problem. Here's the success case:
- Master node connects successfully.
- Worker nodes also appear as expected in `kubectl get nodes`.

Any advice would really be appreciated, as I'm at a loss!

3 Answers

Answered By NetworkGuru99 On

Double check if you're using hostnames or IPs correctly when adding additional servers. Also, ensure that your `/etc/hosts` file has the correct entries for each node if you're using hostnames. And take note if you have multiple network interfaces, that could complicate things too.

Answered By CodeNinja88 On

Make sure you're using the correct token format. The token `k3stoken` that you're setting might not be the right one. Try using the token generated during the first installation located at `/var/lib/rancher/k3s/server/token` for the next nodes you want to join.

Answered By UserExplorer42 On

Check the logs on the nodes that aren't joining. Sometimes those logs can reveal issues that aren't obvious at first. You can find the logs in the `/var/log` directory. Here's a link for more details: [k3s logs FAQ](https://docs.k3s.io/faq#where-are-the-k3s-logs). Good luck!

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.