Score:1

How to enable ipv6 for ingress-controller services when installing using Helm nginx-ingress chart?

in flag

I have a baremetal K8 cluster setup using Kubespray (Calico as CNI) and have dual stack enabled. I can see that all the pods that get deployed get both IPv4 and IPv6 addresses but when I try to install nginx-ingress controller using nginx helm chart the services only have IPv4 enabled and assigned. I can see the following spec when I do kubectl get on the service:

kubectl get svc ingress-nginx-controller -n ingress-nginx -o yaml

spec:
  clusterIP: 10.233.34.249
  clusterIPs:
  - 10.233.34.249
  externalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack

I've tried manually adding the following spec to values.yaml file for ingress-controller helm chart:

  service:
    enabled: true

    annotations: {}
    labels: {}
    # clusterIP: ""

    ## List of IP addresses at which the controller services are available
    ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
    ##

    ipFamilyPolicy: PreferDualStack
    ipFamilies:
     - IPv6
     - IPv4

and applying it using the following but to no avail : helm install ingress-nginx ingress-nginx/ingress-nginx -f values.yaml -n ingress-nginx

Its not only an issue with ingress, basically any application that I'm trying to deploy using helm charts have Single Stack and IPv4 as specs for services which makes me think that I'm missing some manual config required in values files for these charts.

Also when I tried to create a basic service and deployed it using a service file directly with the ipFamilyPolicy: PreferDualStack and ipFamilies: IPv6, IPv4 then the service was deployed successfully and got both v6 and v4 addresses assigned. So I know from a cluster perspective my config is fine and its some missing parameter with the charts being deployed.

p10l avatar
us flag
Which versions of K8s, calico, and helm are you using?
mickey9 avatar
in flag
Using k8 1.21, calico: 3.20.1 and helm is 3.6.3.
p10l avatar
us flag
If possible, please share your helm values.
Wytrzymały Wiktor avatar
it flag
Hello @mickey9. Any updates?
moonkotte avatar
in flag
In shorts words, yes, `values.yaml` should be updated and moreover, `helm charts` should be adapted to be able to set up `IPv6` services. Starting kubernetes 1.23 `dual-stack` is supported as normal.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.