Skip to content

Disable default IPv4 IPPool creation when ipv4_stack=false in pure IPv6 deployments (Calico) and ip assignment to the PODs #13157

@kanyahal06

Description

@kanyahal06

What would you like to be added

  • In a pure IPv6 Kubernetes deployment using Kubespray v2.29.1, setting:

k8s-cluster.yml
ipv6_stack: true ipv4_stack: false

  • To correctly disable IPv4 address autodetection in the calico-node DaemonSet. The following environment variables are rendered as expected:
    File: extra_playbooks/roles/network_plugin/calico/templates/calico-node.yml.j2
`
- name: IP
  value: none
- name: IP6
  value: autodetect
- name: IP_AUTODETECTION_METHOD
  value: can-reach=$(NODE_IP)
`
  • However, despite disabling the IPv4 stack, Calico still creates a default IPv4 IPPool (dummy pool), which is visible via:

calicoctl get ippools

This can be controlled via:

`- name: CALICO_IPV4POOL_CIDR
  value: "none"
`
  • Kubespray currently does not set this variable when ipv4_stack=false.

  • When ipv4_stack: false is configured, Kubespray should explicitly disable IPv4 pool creation by adding the following environment variable to the calico-node DaemonSet:

`{% if not ipv4_stack %}
- name: CALICO_IPV4POOL_CIDR
  value: "none"
{% endif %}
`
assign_ipv6: true, 
assign_ipv4: false

Why is this needed

  • The presence of an IPv4 IPPool contradicts the intent of a pure IPv6 cluster.

  • Although this IPv4 pool does not currently impact functionality, it introduces:

  • Configuration inconsistency
    Potential confusion for operators
    Deviation from expected "IPv6-only" behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions