-
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
Fedora 32 - no network access from within pods running on k3s #1711
Comments
Just go with supported os... |
hi @lukasmrtvy, thanks for your comment!
I understand that Fedora isn't the optimum OS for k3s but I've opened this issue because the k3s system requirements say "K3s should run on just about any flavor of Linux.", so I thought this might be a valid problem report? (also k3s worked fine for me on Fedora 31 with cgroups v2 disabled and with the optional k3s selinux policy rpm installed).
cgroups v2 can get disabled via boot cmdline param (
k3s provides rpm packages for a selinux policy. Is it only intended for EL7? Are there known issues with it on Fedora? (Also, in case that there's a critical selinux issue it should still be possible to run k3s unconfined and with the k3s flag
is it a |
still, there is no official fedora support, you are on your own.. |
I play with several nodes on my laptop, so I use docker-compose based k3s. It worked fine on Fedora 31 with old cgroups. After upgrading to Fedora 32 I followed this guide and I can access external networks. |
@lukasmrtvy I too have problems on Fedora 31/32... See #1719. I'm not too bothered about Fedora not being supported, but how about RHEL/CentOS 8? I'm going to give it a go and see if it's any better. |
I wonder if iptables could be a problem |
Sadly I do not know how firewalls work. But it is clear that the traffic on Docker's interface (not docker0) is blocked somehow. And I found a way (guide) to overcome that: $ ifconfig | grep br
br-140b51f1acd2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.22.0.1 netmask 255.255.0.0 broadcast 172.22.255.255
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
inet 192.168.1.112 netmask 255.255.255.0 broadcast 192.168.1.255
$ sudo firewall-cmd --zone=trusted --change-interface=br-140b51f1acd2 Or as a 1-liner: |
Most of this can be avoided with the proper boot parameters, which must be edited with grubby. As for nf-tables: And iptables has to be switched to legacy mode: Kubernetes and/or k3s does not support nftables (which is the default in Fedora 32)! |
Set |
Tested this with Fedora 32 VM's, can confirm that inter-node communication breaks, though in my tests internet connectivity is lost only on the worker nodes... |
Try setting AllowZoneDrifting=yes in firewalld.conf. In my testing this fixes the issue. |
Kubernetes (unclear on k3s) supports iptables_nft since 1.18 and the fix is likely to be backported as far back as 1.16. |
This repository uses a bot to automatically label issues which have not had any activity (commit/comment/label) for 180 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the bot can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the bot will automatically close the issue in 14 days. Thank you for your contributions. |
Is this fixed with FC34? |
You might try again with a more recent release of k3s. |
This repository uses a bot to automatically label issues which have not had any activity (commit/comment/label) for 180 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the bot can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the bot will automatically close the issue in 14 days. Thank you for your contributions. |
After upgrading from Fedora 31 (with k3s 1.17.4 installed) to Fedora 32 (GA release) I noticed that my pods couldn't reach destinations on the network/Internet anymore.
As a quick fix, allowing NAT in the firewall helped:
Version:
k3s v1.17.4+k3s1 (3eee8ac)
K3s arguments:
defaults via systemd service unit (
usr/local/bin/k3s server
)Describe the bug
With a default/vanilla k3s installation on Fedora 32 pods running on k3s don't have ext network / Internet access.
To Reproduce
install k3s on Fedora 32 (or upgrade a Fedora 31 system with k3s installed to Fedora 32), start and attach to a pod and try to ping/curl/telnet any destination on the ext network or Internet.
Expected behavior
Pods have network access
Actual behavior
Pods don't have network access
Additional context / logs
see above for workaround
The text was updated successfully, but these errors were encountered: