Merge pull request #48572 from iheartNathan/48403-Update-command-to-enable-IPv6-forwarding-in-Dual-stack-support-with-kubeadm-documentation

update how to persist enabling ipv6 forwarding across reboot
pull/48728/head
Kubernetes Prow Robot 2024-11-15 00:56:52 +00:00 committed by GitHub
commit 29da719dd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 24 additions and 2 deletions

View File

@ -22,8 +22,30 @@ You need to have installed the {{< glossary_tooltip text="kubeadm" term_id="kube
following the steps from [Installing kubeadm](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/).
For each server that you want to use as a {{< glossary_tooltip text="node" term_id="node" >}},
make sure it allows IPv6 forwarding. On Linux, you can set this by running run
`sysctl -w net.ipv6.conf.all.forwarding=1` as the root user on each server.
make sure it allows IPv6 forwarding.
### Enable IPv6 packet forwarding {#prerequisite-ipv6-forwarding}
To check if IPv6 packet forwarding is enabled:
```bash
sysctl net.ipv6.conf.all.forwarding
```
If the output is `net.ipv6.conf.all.forwarding = 1` it is already enabled.
Otherwise it is not enabled yet.
To manually enable IPv6 packet forwarding:
```bash
# sysctl params required by setup, params persist across reboots
cat <<EOF | sudo tee -a /etc/sysctl.d/k8s.conf
net.ipv6.conf.all.forwarding = 1
EOF
# Apply sysctl params without reboot
sudo sysctl --system
```
You need to have an IPv4 and and IPv6 address range to use. Cluster operators typically
use private address ranges for IPv4. For IPv6, a cluster operator typically chooses a global