Skip to content

hack: make the kind cluster's IP family configurable - #827

Closed
Yuan Gao (ygao-g) wants to merge 1 commit into
agent-substrate:mainfrom
ygao-g:kind-ip-family-core
Closed

hack: make the kind cluster's IP family configurable#827
Yuan Gao (ygao-g) wants to merge 1 commit into
agent-substrate:mainfrom
ygao-g:kind-ip-family-core

Conversation

@ygao-g

@ygao-g Yuan Gao (ygao-g) commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

KIND_IP_FAMILY selects ipv4, dual, or ipv6 and passes this through to kind. To prevent insidious failures like pods stuck in ContainerCreating, the script now drops old Docker networks to force IPv6 recreation if needed, validates the daemon's IPv6 support up-front, and enables proxy_ndp (alongside proxy_arp) to properly support gVisor loopback pod-to-pod networking across IPv6 nodes.

The networking setup is fully validated using the newly added hack/verify-kind-networking.sh, which confirms reliable IPv6 distribution across Node IPs, Service ClusterIPs, Pod IPs, Registry configurations, and CoreDNS lookups.

Comment thread hack/create-kind-cluster.sh Outdated
Comment thread hack/create-kind-cluster.sh Outdated
Comment thread hack/create-kind-cluster.sh Outdated
Comment thread hack/create-kind-cluster.sh Outdated
Comment thread hack/create-kind-cluster.sh Outdated
Comment thread hack/create-kind-cluster.sh Outdated
Comment thread hack/create-kind-cluster.sh Outdated
@ygao-g
Yuan Gao (ygao-g) force-pushed the kind-ip-family-core branch 4 times, most recently from 35b7b13 to 1c3a9b7 Compare August 11, 2026 02:42
@ygao-g
Yuan Gao (ygao-g) marked this pull request as ready for review August 11, 2026 02:50
@ygao-g
Yuan Gao (ygao-g) force-pushed the kind-ip-family-core branch 3 times, most recently from 00c7e32 to 391a903 Compare August 11, 2026 15:54
@ygao-g

Copy link
Copy Markdown
Collaborator Author

KIND_IP_FAMILY selects ipv4, ipv6 or dual and becomes networking.ipFamily,
leaving kind's per-family subnet defaults alone. The script also recreates a
pre-IPv6 "kind" Docker network, fails fast if the daemon has IPv6 off, sets
proxy_ndp alongside proxy_arp for gVisor pod-to-pod traffic, and repoints an
ipv6 kubeconfig from [::1] at localhost so a client outside the Docker host
can still reach the apiserver.

Tested on kind with all three families using the new
hack/verify-kind-networking.sh, which checks node InternalIPs, ClusterIPs, pod
IPs, pod-to-pod, CoreDNS, and a pull through the local registry. Pod IPs,
pod-to-pod and Service allocation run once per requested family rather than
only the primary one, on separate ports so a single [::] socket cannot serve
IPv4 through v4-mapped addresses and mask the v4 path.
@ygao-g

Copy link
Copy Markdown
Collaborator Author

Closing this one — the thread here is all self-review noise from iterating on the script, with no reviewer feedback to carry over. Refiled as #877 with the same commit for a clean read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant