Skip to content

Commit 385d87b

Browse files
committed
fix(cluster): revert nftables kube-proxy mode detection
The nftables kube-proxy mode detection added in PR NVIDIA#18 breaks NodePort routing on hosts where nft is available (including Fedora 43). When kube-proxy runs in nftables mode, the gateway service NodePort (30051) becomes unreachable, causing the health check to time out and the gateway start to fail. The modules-load.d config shipped by the RPM already ensures the legacy iptables kernel modules are loaded, which is the correct fix for the original problem. Remove the nftables detection until k3s nftables mode is validated with the full openshell gateway service configuration.
1 parent 5085967 commit 385d87b

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

‎deploy/docker/cluster-entrypoint.sh‎

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,6 @@ fi
8080

8181
IPTABLES=$([ "${USE_IPTABLES_LEGACY:-0}" = "1" ] && echo iptables-legacy || echo iptables)
8282

83-
# ---------------------------------------------------------------------------
84-
# Select kube-proxy mode
85-
# ---------------------------------------------------------------------------
86-
# k3s defaults kube-proxy to iptables mode, which requires the legacy
87-
# ip_tables kernel module. Modern distros (Fedora 41+, RHEL 10+) load only
88-
# nf_tables by default and may not have the legacy modules available.
89-
# k3s v1.35+ (Kubernetes 1.35) supports the native nftables proxy mode at
90-
# GA stability. Detect nftables availability and prefer it; fall back to the
91-
# default iptables mode on older kernels.
92-
KUBE_PROXY_MODE=""
93-
if command -v nft >/dev/null 2>&1 && nft list tables >/dev/null 2>&1; then
94-
echo "Detected nftables kernel support — using kube-proxy nftables mode"
95-
KUBE_PROXY_MODE="--kube-proxy-arg=proxy-mode=nftables"
96-
fi
97-
9883
RESOLV_CONF="/etc/rancher/k3s/resolv.conf"
9984

10085
has_default_route() {
@@ -651,4 +636,4 @@ wait_for_default_route
651636
# k3s v1.35.2+ no longer accepts --resolv-conf as a top-level server flag;
652637
# it must be passed via --kubelet-arg instead.
653638
# shellcheck disable=SC2086
654-
exec /bin/k3s "$@" --kubelet-arg=resolv-conf="$RESOLV_CONF" $EXTRA_KUBELET_ARGS $KUBE_PROXY_MODE
639+
exec /bin/k3s "$@" --kubelet-arg=resolv-conf="$RESOLV_CONF" $EXTRA_KUBELET_ARGS

0 commit comments

Comments
 (0)