mirror of
https://github.com/kelseyhightower/kubernetes-the-hard-way.git
synced 2025-09-17 01:20:41 +03:00
bridge CNI networking works with iptables
This commit is contained in:
@@ -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:
|
||||||
|
Reference in New Issue
Block a user