Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

How to bring up the Kubernetes dual stack support?

Prerequisites

  • You must be using Kubernetes 1.16 (alpha feature) or later (1.20 beta feature).
  • IPv6 and IPv6 forwarding must be enabled (:
    sysctl -w net.ipv6.conf.all.disable_ipv6=0
    ,

    sysctl -w net.ipv6.conf.all.forwarding=1
    )
  • All the nodes must have an IPv6 address and they should be able to reach others over an IPv6 connection.
    Tip: IPv6 address can be manually assigned to interface via adding in netplan configuration files :
    Edit netplan configuration file (/etc/netplan/50-vagrant.yaml). Add IPv6 address to list of addresses and setting set in interface section:
    accept-ra: no

    After that netplan apply needs to be called.

...

  • Following parameters need to be added to kubeadm init command:
    kube
    -
    controller
    -
    manager–
    pod-
    feature
    network-
    gates="IPv6DualStack=true"
  • –-cluster-cidr=<IPv4 CIDR>,<IPv6 CIDR>
  • –-service-cluster-ip-range=<IPv4 CIDR>,<IPv6 CIDR>
  • kubelet–
    cidr=10.233.64.0/18,2001:db8:1234:5678:8:2::/64 \
    --apiserver-advertise-address=192.168.121.3 \
    --service-cidr=10.96.0.0/12,2001:db8:1234:5678:8:3::/108 \
    --feature-gates=
    "
    IPv6DualStack=true
    "
     \
    kube
    -
    proxy–
    -
    proxy-mode=ipvs
  • –-cluster-cidrs=<IPv4 CIDR>,<IPv6 CIDR>
  • –-feature-gates="IPv6DualStack=true"
    apiserver-advertise-address=10.10.10.13