Can I use inet and inet6 address respt. for IPv4 and IPv6 addresses of a kubernetes node in case of dual stack cluster

17 Views Asked by At

I am creating a dual stack kubernetes cluster so want to assign both IPv4 and IPv6 to my cluster nodes. I have following interface config:

2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 46:8b:35:6e:2b:fd brd ff:ff:ff:ff:ff:ff
    altname enp0s18
    inet 10.64.26.146/24 brd 10.64.26.255 scope global noprefixroute ens18
       valid_lft forever preferred_lft forever
    inet6 fe80::5dd7:cc12:1132:bdcb/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: ens19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether ca:1d:fe:94:7d:72 brd ff:ff:ff:ff:ff:ff
    altname enp0s19
    inet 30.30.30.10/24 brd 30.30.30.255 scope global noprefixroute ens19
       valid_lft forever preferred_lft forever
    inet6 fe80::55ce:825e:f548:b5ce/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

Currently, I have a node created with Internal IP as the IPv4 address of ens19:

root@nehacalico-Standard-PC-i440FX-PIIX-1996:/home/neha-calico# k get nodes -o wide
NAME                                            STATUS     ROLES           AGE    VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION       CONTAINER-RUNTIME
nehacalico-standard-pc-i440fx-piix-1996         NotReady   control-plane   3d2h   v1.28.2   30.30.30.10    <none>        Ubuntu 20.04.6 LTS   5.15.0-100-generic   containerd://1.6.28

I also need to assign a IPv6 address to the node as I am creating dual stack IPv4/IPv6 setup for this cluster. So can I use the inet6 address of the ens19 interface as IPv6 address of my node OR do I need to use an another interface for getting IPv6 address?

Note: I tried to set the IPv6 address by setting it in kubelet config like

KUBELET_KUBEADM_ARGS="--container-runtime-endpoint=unix:///var/run/containerd/containerd.sock --pod-infra-container-image=registry.k8s.io/pause:3.9 --node-ip=30.30.30.10, fe80::55ce:825e:f548:b5ce"

but it's not reflected on the node's IPv6 address

0

There are 0 best solutions below