Commit d0b6ee6
committed
fix(bootstrap): fix nftables healthcheck and warn on missing flannel modules
Flannel's embedded traffic manager in k3s v1.35.x is compiled without the
nft backend — it only has iptables-legacy support, which requires kernel
modules (ip_tables, iptable_nat, iptable_filter, iptable_mangle) that
modern distributions (Fedora 43+, RHEL 10+) no longer load by default.
Changes:
- cluster-entrypoint.sh: When running under Podman, check whether the
iptable_nat module is loaded and emit an actionable warning if not.
The modules are expected to be loaded at boot via modules-load.d
(installed by the RPM spec); the warning covers the case where the
host hasn't rebooted since installation.
- cluster-healthcheck.sh: Replace the hardcoded 127.0.0.1 NodePort check
with the node's actual InternalIP. When kube-proxy runs in nftables
mode, NodePort DNAT rules only match the node's real IP addresses —
loopback is not in the nftables nodeport-ips set, so the old check
always failed.
Tested on Fedora 43 (kernel 6.19, Podman 5.8.1) with the full lifecycle:
gateway start, provider create/list/delete, sandbox create/exec/delete.1 parent 4b67305 commit d0b6ee6
2 files changed
Lines changed: 38 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
678 | | - | |
679 | | - | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
680 | 689 | | |
681 | 690 | | |
682 | 691 | | |
683 | 692 | | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
684 | 706 | | |
685 | 707 | | |
686 | 708 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
81 | 86 | | |
82 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
0 commit comments