Hi. I set up a new k3s cluster. When I set up the ...
# kubernetes
i
Hi. I set up a new k3s cluster. When I set up the 2nd node, I run
Copy code
curl -sfL <https://get.k3s.io> | INSTALL_K3S_EXEC='--write-kubeconfig-mode=644' K3S_TOKEN=$TOKEN sh -s - server --server https://<IP adress of first node>:6443
where TOKEN is the content of /var/lib/rancher/k3s/server/token on the first server. However, /var/lib/rancher/k3s/server/token on the 2nd server will contain a different value and the nodes do not connect. I have set up a k3s cluster before in exactly the same way and it had worked; the tokens have to be the same on all nodes. What can possibly be cause of this issue ? I have exlcuded all described causes (networking, firewall, nodenames) and checked k3s logs, but cannot find any hint.
s
Have you tried uninstalling agent with
Copy code
/usr/local/bin/k3s-agent-uninstall.sh
double check the server token value before running the install command on agent
i
with this command it works
Copy code
curl -sfL <https://get.k3s.io> | K3S_TOKEN=$TOKEN K3S_URL=<https://10.9.2.121:6443> sh -s - server