k3s server kube-system CrashLoopBackOff after installing nftables v1.1.0 #10883
Replies: 5 comments 1 reply
-
When you say you're installing it after building it from source, what exactly do you mean? Are you just replacing the binary on the host? Are you perhaps building and installing a package that triggers post install scripts that interfere with Kubernetes networking? It really looks like something you're doing is breaking the flannel or kube-proxy iptables rules. |
Beta Was this translation helpful? Give feedback.
-
Debian 11 , nft version is Even if assume the cause is just nftables 1.1.0, why after uninstalling it sill pods fails ? I can think if a library dependency that has been overridden by nft 1.1.0 causing the issue for kube-proxy or flannel , for testing this I uninstalled iptable, nft-libs* all of them dpkg -l | grep nft
ii libnftables1:amd64 0.9.8-3.1+deb11u2 amd64 Netfilter nftables high level userspace API library
ii libnftnl-dev:amd64 1.1.9-1 amd64 Development files for libnftnl
ii libnftnl11:amd64 1.1.9-1 amd64 Netfilter nftables userspace API library
ii nftables 0.9.8-3.1+deb11u2 amd64 Program to control packet filtering rules by Netfilter project but did not help either Also reinstalling the default Debian 11 nft dd not help :| Any idea to trace more and find the root cause ? |
Beta Was this translation helpful? Give feedback.
-
I deleted all pods in kube-system so be created again kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
coredns-576bfc4dc7-hfvbx 0/1 Running 0 42s
local-path-provisioner-6795b5f9d8-dmrz2 1/1 Running 1 (15s ago) 46s
metrics-server-557ff575fb-rrjck 1/1 Running 0 23m now metrics-server is fine , local-path keeps restarting, and coredns does not get ready CoreDNS error Warning Unhealthy 4m16s (x22 over 4m55s) kubelet Readiness probe failed: HTTP probe failed with statuscode: 503 Local Path error Warning BackOff 5s (x9 over 3m20s) kubelet Back-off restarting failed container local-path-provisioner in pod local-path-provisioner-6795b5f9d8-dmrz2_kube-system(48ac961f-da91-4b20-9aa3-e6f5323725d4) |
Beta Was this translation helpful? Give feedback.
-
K3s is statically linked and does not directly call into nft itself. It does however use the host iptables commands, and if you're breaking the iptables-nft backend by replacing the nft libraries with a completely different major version that causes subtle changes in behavior, that would be a problem. You can tell k3s to use our statically linked iptables binaries, instead of the host iptables wrappers, by starting k3s with I'm going to convert this to a discussion, because I don't see that there is anything wrong with k3s itself. You're replacing distro packages with incompatible versions and stuff is breaking. |
Beta Was this translation helpful? Give feedback.
-
I did not find the exact root cause of the issue , but further testing showed the same error on Debian 12 as well . Now I have k3s server with nft 1.1.0 with no issue I someone knows the exact root cause please let me know |
Beta Was this translation helpful? Give feedback.
-
Environmental Info:
K3s Version:
Node(s) CPU architecture, OS, and Version:
Cluster Configuration:
Describe the bug:
k3s is installed on Debian 11, but sometimes (randomly) when nftables 1.1.0 is also installed on that machine , then k3s server kube-system pods are failed . This tested in two ways
If we install nft 1.1.0 and then k3s server immediately all kube-system pods fail
if we install k3s first , there is no error, but immediately after installing nft 1.1.0 all kube-system pods fail
Steps To Reproduce:
Expected behavior:
No kube-system pod failure
Actual behavior:
all of them seem to fail due to liveness/readiness probe failure
Additional context / logs:
checking the metrics-server
here is the error for this pod
https://10.12.0.33:10250/readyz": dial tcp 10.12.0.33:10250: connect: connection refused
also
nc
the ip and port failbut can
ping
itand the logs of this pod
within the host , the endpoint is available
and
nc
nc -t -zv 10.13.0.1 443 Connection to 10.13.0.1 443 port [tcp/https] succeeded!
Blaming the nftables for the cause of issue, I uninstalled nft 1.1.0 and its related files but did did help
Also
has not changed and
iptables-save
has no errorlastly I should mention that ntables 1.1.0 just installed without applying any rule so there is no rule to have conflict with legacy iptables
iptables-save.txt
Any idea why kube-system pods fail ?
Beta Was this translation helpful? Give feedback.
All reactions