Closed metal3d closed 3 days ago
Precision taken from logs:
Nov 22 10:07:06 kind-control-plane kubelet[723]: E1122 10:07:06.291937 723 log.go:32] "StopPodSandbox from runtime service failed" err=<
Nov 22 10:07:06 kind-control-plane kubelet[723]: rpc error: code = Unknown desc = failed to destroy network for sandbox "41bab85940ca4be1d3ada6a2eb22b11d51418ff4cbed344b6a7baa90f683135d": plugin type="portmap" failed (delete): neither iptables nor ip6tables is usable, (iptables) running [/usr/sbin/iptables -t nat -S OUTPUT --wait]: exit status 3: modprobe: ERROR: could not insert 'ip_tables': Operation not permitted
Nov 22 10:07:06 kind-control-plane kubelet[723]: iptables v1.8.9 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Nov 22 10:07:06 kind-control-plane kubelet[723]: Perhaps iptables or your kernel needs to be upgraded.
Nov 22 10:07:06 kind-control-plane kubelet[723]: , (ip6tables) running [/usr/sbin/ip6tables -t nat -S OUTPUT --wait]: exit status 3: modprobe: ERROR: could not insert 'ip6_tables': Operation not permitted
Nov 22 10:07:06 kind-control-plane kubelet[723]: ip6tables v1.8.9 (legacy): can't initialize ip6tables table `nat': Table does not exist (do you need to insmod?)
Nov 22 10:07:06 kind-control-plane kubelet[723]: Perhaps ip6tables or your kernel needs to be upgraded.
Nov 22 10:07:06 kind-control-plane kubelet[723]: > podSandboxID="41bab85940ca4be1d3ada6a2eb22b11d51418ff4cbed344b6a7baa90f683135d"
On Fedora 41, these modules are not loaded and not found
This is rootless with pasta? Have you seen: https://kind.sigs.k8s.io/docs/user/rootless/
attempting to run kubernetes rootlessly is a bit more fiddly and has some additional requirements
That worked until Tuesday... For any reason, that fails yesterday.
I just tried to force the delegation in systemd, and unfortunately it fails again. 😢
There is a separate note there about iptables
(Also in this case iptables usage is from the standard CNI plugins project)
With apologies, I think I had mistyped the commands to inject the iptables modules - and now I don't have that error anymore.
Fedora may have recently changed the default injected modules.
Now I have a "simple" problem: the control-plane node listens to ports 80 and 443, but I get a connection reset by peer
error when I try to access a site (for example, the demo in the doc).
Note: I've been using kind for years, this is the first time I've had this kind of problem.
(also, port-forwarding 8080 to 80 on the ingress-controller works, the ports that doesn't works are the one in extra port mapping in the configuration shown in my initial comment)
(And thank you for your help)
OK, forget the last problem 😃
I made changes after the first issue (the iptables problem). Back to the original configuration is OK.
Sorry for the noise. I must now alert my teamates that Fedora changes some things that force us to load iptables modules and, possibly, force delegation.
One more time, thanks for all (for your help, and for "kind")
Fedora may have recently changed the default injected modules.
So my very rough understanding is that iptables is being phased out in redhat distros ^1 (?), but shouldn't be totally gone yet.
We are in touch with SIG Network about this, today I confirmed with one of the TLs (@danwinship) that CNI plugins 1.6.0 switches to nftables but we may want to wait for at least 1.6.1 for some bug fixes. Some future kind release will adopt those for new node images.
At some point in the not too distant future the ecosystem will likely be on nftables broadly and then you may not need to load those modules, but currently they are still necessary.
Thanks for understanding and the thank you, and I'm glad you got it figured out 😅
No problem.
One point: something that I probably missed is this https://kind.sigs.k8s.io/docs/user/configuration/#kube-proxy-mode
When I change to nftables
, the same error happens (without loading modules), is there any reason that iptables is still necessary when I set kubeProxyMode: "nftables"
?
CNI plugins 1.6.0 doesn't "switch to" nftables, it just supports nftables. But everything will still default to using iptables unless you request nftables in the CNI config, or you don't have iptables installed.
@metal3d that changes the kube-proxy config but the errors here were coming from the CNI portmap plugin.
Thanks for all these explanation.
What happened:
Using kind to start a cluster, then apply the ingress-controller installation. The pods fails to go in condition "ready" and the events says:
What you expected to happen:
As one week ago, having a local cluster and the ingress working 😄
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
One week ago, everything worked without any problem. I don't know what happened (upgrade?) but it's now crashing.
Environment:
kind version
): kind v0.25.0 go1.23.3 linux/amd64docker info
,podman info
ornerdctl info
):/etc/os-release
):kubectl version
):net.ipv4.ip_unprivileged_port_start = 80