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
k3s version v1.26.4+k3s1 (8d0255a)
go version go1.19.8
Node(s) CPU architecture, OS, and Version:
Linux HOSTNAME 4.18.0-489.el8.x86_64 #1 SMP Thu Apr 27 17:02:11 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Cluster Configuration:
Single node configuration, CIDR - 10.44.0.0/16
Describe the bug:
Opening the K3S ports using firewalld as explained here and then installing the application works fine and any app deployed in K3S is accessible.
However, reloading firewalld afterwards (for example, to set up a non Kubernetes service) flushes all iptables rules. This breaks any deployment in K3S, making then not accessible anymore.
I tried restarting the K3S service without any success, the K3S iptables rules are not added back.
I have found that rebooting the whole physical server gets it back to to work again. So, there is a step there I have not been able to reproduce manually.
Uninstalling and re-installing K3S again works as well, although this is not very handy.
K3S adds back all its iptables rules after a firewalld reload. Not sure if there is any option for this that I have missed.
As mentioned above, it all goes back to normal after a system reboot.
Knowing the command to manually reload K3S iptables rules could be a temporal solution to be executed after every reload. Not ideal, but would be helpful
Actual behavior:
All K3S-related iptables rules are flushed after firewalld reloads
All K3S deployments are inaccesible
PS: While writing creating this issue I noticed that ~30 seconds after reloading firewalld, a few rules are added back.
This means that K3S is indeed reactive to firewalld reloads, but fore some reason not all the rules are restored and the services remain inaccessible
Is there some way to make my system aware of the ports being used by K3S?
The devices I am working on are multi-user and not exclusive to K3S. So I am afraid that, at some point, somebody will end trying to bind their own service to one this ports
However, reloading firewalld afterwards (for example, to set up a non Kubernetes service) flushes all iptables rules. This breaks any deployment in K3S, making then not accessible anymore.
Don't do that. We don't recommend using self-managed iptables-based firewalls alongside k3s. If you must, make sure that they don't attempt to exclusively manage the iptables ruleset, and make sure that you've allowed access to/from the cluster CIDRs. See the examples at https://docs.k3s.io/advanced#red-hat-enterprise-linux--centos
Environmental Info:
K3s Version:
k3s version v1.26.4+k3s1 (8d0255a)
go version go1.19.8
Node(s) CPU architecture, OS, and Version:
Linux HOSTNAME 4.18.0-489.el8.x86_64 #1 SMP Thu Apr 27 17:02:11 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Cluster Configuration:
Single node configuration, CIDR - 10.44.0.0/16
Describe the bug:
Opening the K3S ports using firewalld as explained here and then installing the application works fine and any app deployed in K3S is accessible.
However, reloading firewalld afterwards (for example, to set up a non Kubernetes service) flushes all iptables rules. This breaks any deployment in K3S, making then not accessible anymore.
I tried restarting the K3S service without any success, the K3S iptables rules are not added back.
I have found that rebooting the whole physical server gets it back to to work again. So, there is a step there I have not been able to reproduce manually.
Uninstalling and re-installing K3S again works as well, although this is not very handy.
Steps To Reproduce:
Provided script to reproduce the steps above
Expected behavior:
K3S adds back all its iptables rules after a firewalld reload. Not sure if there is any option for this that I have missed.
As mentioned above, it all goes back to normal after a system reboot.
Knowing the command to manually reload K3S iptables rules could be a temporal solution to be executed after every reload. Not ideal, but would be helpful
Actual behavior:
All K3S-related iptables rules are flushed after firewalld reloads
All K3S deployments are inaccesible
PS: While writing creating this issue I noticed that ~30 seconds after reloading firewalld, a few rules are added back.
This means that K3S is indeed reactive to firewalld reloads, but fore some reason not all the rules are restored and the services remain inaccessible
Additional context / logs:
It looks like other similar technologies have had similar issues. Although I lack the expertise to know whether this specific cases could be relevant for K3S.
weaveworks/weave#3586
https://github.com/moby/moby/pull/9397/files
iptables output:
1_iptables_before_firewalld_reload.txt
2_iptables_after_firewalld_reload.txt
3_iptables_after_firewalld_reload_and_30_secs.txt
4_iptables_after_system_reboot.txt
The text was updated successfully, but these errors were encountered: