You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you mean how to get it up and running again after the IP has changed?
I just struggled with the same thing myself while setting up a cluster at my home network. And then only afterwards thinking of setting up a static IP on the master and nodes.
In my case, every IP changed on both server and agent.
So im not sure if this is needed if ever just an agent changes its IP.
What worked for me was doing the following:
Login to the k3s server
run sudo kubectl delete node <name-of-node> (No need for sudo if your kubeconfig already has 644 as its write permissions)
If the server IP changed - Login to the node
Change k3S_URL in /etc/systemd/system/k3s-agent.service.env file to the correct value
Restart agent. Im not sure if a service restart will do (systemctl restart k3s-agent) - I just rebooted the entire agent.
Quick question, are you able to run k3s with a dynamically changing IP address? Say for example you want a worker node to be able to connect to different networks but still talked to the master node.
I managed to just change k3S_URL in /etc/systemd/system/k3s-agent.service.env file, and then run systemctl restart k3s-agent, and I have the nodes connected again.
I didn't even remove the node, and didn't reboot the system.
Activity
Cnordbo commentedon Jun 30, 2022
Do you mean how to get it up and running again after the IP has changed?
I just struggled with the same thing myself while setting up a cluster at my home network. And then only afterwards thinking of setting up a static IP on the master and nodes.
In my case, every IP changed on both server and agent.
So im not sure if this is needed if ever just an agent changes its IP.
What worked for me was doing the following:
serversudo kubectl delete node <name-of-node>(No need for sudo if your kubeconfig already has644as its write permissions)/etc/systemd/system/k3s-agent.service.envfile to the correct valueRestart agent. Im not sure if a service restart will do (
systemctl restart k3s-agent) - I just rebooted the entire agent.Hacker-OH commentedon Nov 16, 2022
Quick question, are you able to run k3s with a dynamically changing IP address? Say for example you want a worker node to be able to connect to different networks but still talked to the master node.
harryzcy commentedon Jan 13, 2023
I managed to just change
k3S_URLin/etc/systemd/system/k3s-agent.service.envfile, and then runsystemctl restart k3s-agent, and I have the nodes connected again.I didn't even remove the node, and didn't reboot the system.
caroline-suse-rancher commentedon Apr 20, 2023
Converting this to a discussion