@@ -47,50 +47,33 @@ check the documentation for that version.
47
47
<!-- body -->
48
48
## Install and configure prerequisites
49
49
50
- The following steps apply common settings for Kubernetes nodes on Linux.
50
+ ### Network configuration
51
51
52
- You can skip a particular setting if you're certain you don't need it.
52
+ By default, the Linux kernel does not allow IPv4 packets to be routed
53
+ between interfaces. Most Kubernetes cluster networking implementations
54
+ will change this setting (if needed), but some might expect the
55
+ administrator to do it for them. (Some might also expect other sysctl
56
+ parameters to be set, kernel modules to be loaded, etc; consult the
57
+ documentation for your specific network implementation.)
53
58
54
- For more information, see
55
- [ Network Plugin Requirements] ( /docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/#network-plugin-requirements )
56
- or the documentation for your specific container runtime.
59
+ ### Enable IPv4 packet forwarding {#prerequisite-ipv4-forwarding-optional}
57
60
58
- ### Forwarding IPv4 and letting iptables see bridged traffic
59
-
60
- Execute the below mentioned instructions:
61
+ To manually enable IPv4 packet forwarding:
61
62
62
63
``` bash
63
- cat << EOF | sudo tee /etc/modules-load.d/k8s.conf
64
- overlay
65
- br_netfilter
66
- EOF
67
-
68
- sudo modprobe overlay
69
- sudo modprobe br_netfilter
70
-
71
64
# sysctl params required by setup, params persist across reboots
72
65
cat << EOF | sudo tee /etc/sysctl.d/k8s.conf
73
- net.bridge.bridge-nf-call-iptables = 1
74
- net.bridge.bridge-nf-call-ip6tables = 1
75
- net.ipv4.ip_forward = 1
66
+ net.ipv4.ip_forward = 1
76
67
EOF
77
68
78
69
# Apply sysctl params without reboot
79
70
sudo sysctl --system
80
71
```
81
72
82
- Verify that the ` br_netfilter ` , ` overlay ` modules are loaded by running the following commands:
83
-
84
- ``` bash
85
- lsmod | grep br_netfilter
86
- lsmod | grep overlay
87
- ```
88
-
89
- Verify that the ` net.bridge.bridge-nf-call-iptables ` , ` net.bridge.bridge-nf-call-ip6tables ` , and
90
- ` net.ipv4.ip_forward ` system variables are set to ` 1 ` in your ` sysctl ` config by running the following command:
73
+ Verify that ` net.ipv4.ip_forward ` is set to 1 with:
91
74
92
75
``` bash
93
- sysctl net.bridge.bridge-nf-call-iptables net.bridge.bridge-nf-call-ip6tables net. ipv4.ip_forward
76
+ sysctl net.ipv4.ip_forward
94
77
```
95
78
96
79
## cgroup drivers
0 commit comments