You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When deploying an IPv6-only Kubernetes cluster using Kubespray v2.29.1 with:
ipv6_stack: true
ipv4_stack: false
in the k8s-cluster.yml
The nodelocaldns pods fail to start and continuously crash. On inspecting the logs, the issue is traced to incorrect IPv6 address formatting in the generated nodelocaldns ConfigMap.
In the template: "roles/kubernetes-apps/ansible/templates/nodelocaldns-config.yml.j2"
IPv6 addresses are rendered without square brackets [] when used in IP:port format.
Example (current behavior): fd00::10:53
This is invalid for IPv6 when combined with ports and leads to parsing failures.
Correct format should be: [fd00::10]:53
Update the nodelocaldns-config.yml.j2 template to conditionally wrap IPv6 addresses with square brackets when used with ports.
{% if ipv6_stack and not ipv4_stack %}
[{{ some_ip }}]:{{ port }}
{% else %}
{{ some_ip }}:{{ port }}
{% endif %}
What would you like to be added
When deploying an IPv6-only Kubernetes cluster using Kubespray v2.29.1 with:
in the k8s-cluster.yml
The nodelocaldns pods fail to start and continuously crash. On inspecting the logs, the issue is traced to incorrect IPv6 address formatting in the generated nodelocaldns ConfigMap.
In the template: "roles/kubernetes-apps/ansible/templates/nodelocaldns-config.yml.j2"
IPv6 addresses are rendered without square brackets [] when used in IP:port format.
Example (current behavior):
fd00::10:53This is invalid for IPv6 when combined with ports and leads to parsing failures.
Correct format should be:
[fd00::10]:53Update the nodelocaldns-config.yml.j2 template to conditionally wrap IPv6 addresses with square brackets when used with ports.
Why is this needed