Skip to content

Commit 8592ab0

Browse files
authored
Merge pull request NVIDIA#20 from LobsterTrap/fix/revert-nftables-kube-proxy
fix(cluster): revert nftables kube-proxy mode detection
2 parents 5085967 + 385d87b commit 8592ab0

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)