hack: fix DNS on IPv6-only kind clusters - #958
Conversation
45bac3d to
ecf1fc6
Compare
e812e99 to
3350f55
Compare
3350f55 to
302995d
Compare
302995d to
e336c22
Compare
TestingEach check is paired with a control that must fail — the failure mode this guards against is a probe that passes without proving anything.
CI has no IPv6 job and this PR does not add one — #939 is a signal-only draft that produces that coverage on demand. |
533811a to
0212c2c
Compare
0212c2c to
e5e975d
Compare
2b37a71 to
9cc9703
Compare
On a fresh IP_FAMILY=ipv6 cluster nothing resolves from inside a pod and no actor boots: CoreDNS runs dnsPolicy: Default and inherits the node's IPv4 resolver, which a v6-only pod cannot reach. Two Corefile clauses fix it -- a forward to an IPv6 upstream, overridable with IPV6_DNS_UPSTREAM, and a hosts entry for kind-registry. Step 3 already wires the registry into containerd on the node, but atelet pulls from its own pod netns, where the name does not resolve. IPv4 and dual-stack pods get both names from Docker's embedded resolver, so this is gated on ipv6 and those families are untouched. hack/verify-ipv6-dns.sh proves it and runs last in create-kind-cluster.sh, but stays separate so a live cluster can be re-checked: the hosts entry records an address the registry can move off, and the script names that case instead of blaming a registry that is down (agent-substrate#1049).
9cc9703 to
3dbf64b
Compare
The check queries each CoreDNS replica directly so that one bad replica is named rather than showing up as a coin flip, but a failed leg only printed a line into the probe log: the Service-level lookup still answered, so the marker check passed and the message was never surfaced. One bad replica out of two is half the pods in the cluster unable to resolve, and the check reported success. The legs now emit a marker the caller matches on, and a replica that fails while the Service answers fails the check and is listed by address.
The repoint was unconditional, but localhost reaches the apiserver only where it resolves to ::1, and Debian-family hosts give ::1 the names ip6-localhost and ip6-loopback instead. On a native Linux Docker host kind publishes the apiserver on [::1] and that address already works, so the rewrite replaced a working address with a refused one and every later kubectl in the script died at connect -- including the DNS check this series adds, which could not have run there at all. It now repoints only when [::1] does not answer, which is the VM-hosted-daemon case it was written for. On Ubuntu 25.10 with a native daemon, [::1] serves /healthz, localhost is refused, and a full IPv6-only bring-up including the DNS check completes.
|
Ping — this one is a two-file Worth knowing that the branch has moved since it was last looked at. Two commits went on, both fixes for defects I hit while trying to run it rather than responses to review: the DNS gate was reporting green with one of kind's two CoreDNS replicas unable to resolve, and the IPv6-only kubeconfig repoint was replacing a working apiserver address with a refused one on a native-Linux Docker host, which killed every |
Part of #246.
IPV6_DNS_UPSTREAMknob is documented in the scripts'--help)On a fresh
IP_FAMILY=ipv6cluster nothing resolves from inside a pod and no actor boots: CoreDNS runsdnsPolicy: Defaultand inherits the node's IPv4 resolver, which a v6-only pod cannot reach. Two Corefile clauses fix it — aforwardto an IPv6 upstream, overridable withIPV6_DNS_UPSTREAM, and ahostsentry forkind-registry, which step 3 wires into containerd on the node but atelet pulls from its own pod netns. IPv4 and dual-stack pods get both names from Docker's embedded resolver, so this is gated onipv6and those families are untouched.hack/verify-ipv6-dns.shproves it and runs last increate-kind-cluster.sh, but stays separate so a live cluster can be re-checked: thehostsentry records an address the registry can move off, and the script names that case instead of blaming a registry that is down (#1049). CI has no IPv6 job (#939 is signal-only), so it runs by hand; results in a comment below.atenet-egressstill crashloops on v6-only, for an unrelated Envoy bind bug.🤖 Generated with Claude Code