Commit b4d3062
committed
fix(bootstrap): load flannel iptables modules and fix nftables healthcheck
Flannel's embedded traffic manager in k3s v1.35.x is compiled without the
nft backend — it only supports iptables-legacy, 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, explicitly load the
legacy iptables kernel modules via modprobe before starting k3s. The
container already runs privileged, so modprobe works when /lib/modules
is available.
- docker.rs: Bind-mount /lib/modules from the host into the gateway
container (read-only) so the entrypoint's modprobe calls can find the
host kernel modules.
- 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 b4d3062
3 files changed
Lines changed: 47 additions & 7 deletions
File tree
- crates/openshell-bootstrap/src
- deploy/docker
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
708 | | - | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
709 | 719 | | |
710 | 720 | | |
711 | 721 | | |
| |||
| 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 | + | |
684 | 704 | | |
685 | 705 | | |
686 | 706 | | |
| |||
| 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