I am working with the kubernetes/ingress-nginx helm chart and I would like to "DualStack" both IPv4 and IPv6 on the same Ingress controller.
The helm chart controller.service.loadBalancerIP only accepts a string and I assume that can only be a single IP address. IPv4 or IPv6.
How do I expose my Ingress traffic to both IPv4 or IPv6 on AKS ?
(I don't want to set up two ingress controllers for this)
From Kubernetes v1.16 IPv4/IPv6 dual-stack is added as alpha feature, which means you need to enable it via feature gates.
To enable IPv4/IPv6 dual-stack, enable the
IPv6DualStack
feature gate for the relevant components of your cluster, and set dual-stack cluster network assignments:
- kube-apiserver: -
--feature-gates="IPv6DualStack=true"
- kube-controller-manager: -
--feature-gates="IPv6DualStack=true"
---cluster-cidr=<IPv4 CIDR>,<IPv6 CIDR>
---service-cluster-ip-range=<IPv4 CIDR>,<IPv6 CIDR>
---node-cidr-mask-size-ipv4|--node-cidr-mask-size-ipv6
defaults to /24 for IPv4 and /64 for IPv6- kubelet: -
--feature-gates="IPv6DualStack=true"
- kube-proxy: -
--cluster-cidr=<IPv4 CIDR>,<IPv6 CIDR>
---feature-gates="IPv6DualStack=true"
Note: An example of an IPv4 CIDR:
10.244.0.0/16
(though you would supply your own address range) An example of an IPv6 CIDR:fdXY:IJKL:MNOP:15::/64
(this shows the format but is not a valid address - see RFC 4193)
You also need a CNI which will support the dual-stack for example Calico and you can check how to Enable dual stack.
Unfortunately I do not know how to do that on AKS.