-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using k3s when WiFi goes down/unavailable for sometime #5048
Comments
This is not K3s specific; it's a limitation of Kubernetes. See the existing discussion at #1144 |
@brandond #1144 is a bit different. In this case I need a way to recover once the WiFi connection is available. I do understand that it’s a k8s limitation but k3s describes itself as a good solution for IoT so I assumed that there would be a way to fix this, even if it’s a patchy way as suggested in #1144 - which didn’t work in my case. |
Hmm. Is the issue that you are left without a default route for a while... or that you are experiencing some secondary issues caused by changes to the network such as receiving a new address on your host from DHCP? In my experience the default route is only necessary on startup. Anything that happens after the node is up is probably more related to addresses changing, DNS timing out, etc. |
This issue occurs when WiFi is down and IoT device is being started i.e k3s is being started automatically after boot. At that point there’s no default route until the WiFi is available again. as for the second part that you mentioned, I have opened a different bug about it rancher/rancher#34601 but for some reason it has been closed and I haven’t solved it. |
Ah OK. So the first part is definitely the issue I linked to. You might be able to fuss around a bit and configure a dummy interface with a higher-cost default route on it, but the best way to do that is probably distro-specific. The second issue is going to be related as well, and not something Rancher can fix. Kubernetes is mostly designed for datacenter use. We do a fair bit of tweaking to make it work on edge nodes, but there are some bits of it that just aren't really intended to handle dynamic addresses and major network topology changes; a lot of the time the answer is just going to be that things need to be restarted. |
OK my current hacky solution is:
WiFi has a static IP address 10.10.102.17 and the default route it 10.10.102.1. These are the steps I did:
At this point I see this error:
At this point everything works again. What I don't understand is:
|
Environmental Info:
K3s Version:
Node(s) CPU architecture, OS, and Version:
Cluster Configuration:
single node on a Jetson Xavier:
Describe the bug:
Running k3s requires a default route. k3s is known as a great solution for kubernetes on IoT edge devices. IoT devices might experience connectivity issues such as low or no WiFi signal for a period of time. While this happens, if k3s service has been started (
sudo service k3s start
) it will crash with the following error:There are sort of related bugs: #1144, #14840, #1103. However:
Currently I'm using these hack to solve this problem:
Notes:
dummy0
is up and WiFi is back, WiFi won't be available thereforeset dummy0 down
Steps To Reproduce:
ip route | grep default
should be emptysudo service k3s restart
Expected behavior:
k3s should work when network/WiFi is not available. IoT devices experience connectivity issues as part of the nature of their usage and k3s should be able to face this.
Actual behavior:
k3s requires a default route which doesn't exist when the network is down.
The text was updated successfully, but these errors were encountered: