bridge CNI networking works with iptables

pull/857/head
Kelsey Hightower 2025-04-07 17:46:00 -07:00
parent ea9178edae
commit 86d51471b4
1 changed files with 19 additions and 0 deletions

View File

@ -114,6 +114,25 @@ Create the `bridge` network configuration file:
mv 10-bridge.conf 99-loopback.conf /etc/cni/net.d/ mv 10-bridge.conf 99-loopback.conf /etc/cni/net.d/
``` ```
To ensure network traffic crossing the CNI `bridge` network is processed by `iptables`, load and configure the `br-netfilter` kernel module:
```bash
{
modprobe br-netfilter
echo "br-netfilter" >> /etc/modules-load.d/modules.conf
}
```
```bash
{
echo "net.bridge.bridge-nf-call-iptables = 1" \
>> /etc/sysctl.d/kubernetes.conf
echo "net.bridge.bridge-nf-call-ip6tables = 1" \
>> /etc/sysctl.d/kubernetes.conf
sysctl -p /etc/sysctl.d/kubernetes.conf
}
```
### Configure containerd ### Configure containerd
Install the `containerd` configuration files: Install the `containerd` configuration files: