Skip to content

Commit 5c22fe8

Browse files
committed
Add ipset and netfilter kernel modules for k3s NetworkPolicy support
kube-router (k3s embedded network policy controller) requires ipset kernel support to enforce NetworkPolicy rules. Without these modules, kube-router silently skips starting the network policy controller with: "Skipping network policy controller start, ipset save failed" Adds CONFIG_IP_SET and related hash/bitmap type modules, plus xt_set (iptables set match), xt_physdev, and xt_nflog.
1 parent e09a5f7 commit 5c22fe8

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

meta-dstack/recipes-core/images/dstack-rootfs-base.inc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@ IMAGE_INSTALL = "\
4747
kernel-module-nft-reject \
4848
kernel-module-nft-reject-inet \
4949
kernel-module-nft-hash \
50+
kernel-module-ip-set \
51+
kernel-module-ip-set-hash-ip \
52+
kernel-module-ip-set-hash-net \
53+
kernel-module-ip-set-hash-ipport \
54+
kernel-module-ip-set-hash-ipportip \
55+
kernel-module-ip-set-hash-ipportnet \
56+
kernel-module-ip-set-hash-netiface \
57+
kernel-module-ip-set-bitmap-ip \
58+
kernel-module-ip-set-bitmap-port \
59+
kernel-module-ip-set-list-set \
60+
kernel-module-xt-set \
61+
kernel-module-xt-nflog \
62+
kernel-module-xt-physdev \
5063
fuse3 \
5164
fuse3-utils \
5265
pigz \

meta-dstack/recipes-kernel/linux/files/dstack-docker.cfg

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,20 @@ CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y
4040
CONFIG_VXLAN=y
4141
CONFIG_CGROUP_BPF=y
4242

43+
# ipset support (required by kube-router network policy controller)
44+
CONFIG_IP_SET=m
45+
CONFIG_IP_SET_HASH_IP=m
46+
CONFIG_IP_SET_HASH_NET=m
47+
CONFIG_IP_SET_HASH_IPPORT=m
48+
CONFIG_IP_SET_HASH_IPPORTIP=m
49+
CONFIG_IP_SET_HASH_IPPORTNET=m
50+
CONFIG_IP_SET_HASH_NETIFACE=m
51+
CONFIG_IP_SET_BITMAP_IP=m
52+
CONFIG_IP_SET_BITMAP_PORT=m
53+
CONFIG_IP_SET_LIST_SET=m
54+
CONFIG_NETFILTER_XT_SET=m
55+
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
56+
4357
# BLK IO throttling support
4458
CONFIG_BLK_CGROUP=y
4559
CONFIG_BLK_DEV_THROTTLING=y

0 commit comments

Comments
 (0)