Skip to content

Commit 85e4a6c

Browse files
committed
update how to persist enabling ipv6 forwarding across reboot
1 parent cc33a61 commit 85e4a6c

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

content/en/docs/setup/production-environment/tools/kubeadm/dual-stack-support.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,30 @@ You need to have installed the {{< glossary_tooltip text="kubeadm" term_id="kube
2222
following the steps from [Installing kubeadm](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/).
2323

2424
For each server that you want to use as a {{< glossary_tooltip text="node" term_id="node" >}},
25-
make sure it allows IPv6 forwarding. On Linux, you can set this by running run
26-
`sysctl -w net.ipv6.conf.all.forwarding=1` as the root user on each server.
25+
make sure it allows IPv6 forwarding.
26+
27+
### Enable IPv6 packet forwarding {#prerequisite-ipv6-forwarding}
28+
29+
To check if IPv6 packet forwarding is enabled:
30+
31+
```bash
32+
sysctl net.ipv6.conf.all.forwarding
33+
```
34+
If the output is `net.ipv6.conf.all.forwarding = 1` it is already enabled.
35+
Otherwise it is not enabled yet.
36+
37+
To manually enable IPv6 packet forwarding:
38+
39+
```bash
40+
# sysctl params required by setup, params persist across reboots
41+
cat <<EOF | sudo tee -a /etc/sysctl.d/k8s.conf
42+
net.ipv6.conf.all.forwarding = 1
43+
EOF
44+
45+
# Apply sysctl params without reboot
46+
sudo sysctl --system
47+
```
48+
2749

2850
You need to have an IPv4 and and IPv6 address range to use. Cluster operators typically
2951
use private address ranges for IPv4. For IPv6, a cluster operator typically chooses a global

0 commit comments

Comments
 (0)