GKE cluster DNS fails inside pods intermittently after node auto-scaler removes older node pool
Environment
Google Kubernetes Engine (GKE) Autopilot cluster v1.25.7-gke.1200 with two node pools: pool-a (n1-standard-4) and pool-b (n2-standard-2). Cluster uses CoreDNS (coredns/coredns:1.8.4) as DNS add-on, Cloud NAT for outbound internet, Calico CNI enabled. HorizontalPodAutoscaler and cluster autoscaler are active; pods are scheduled across both pools.
Symptoms
After scale-down events where the autoscaler drains and deletes older nodes in pool-b, some newly scheduled pods intermittently fail DNS resolution for external hostnames (e.g., api.example.com). Symptoms last 1–3 minutes for affected pods; a restart of the pod usually restores DNS resolution. Internal Kubernetes DNS lookups (svc.cluster.local) remain unaffected.
Observations
CoreDNS pod logs show occasional 'read udp ... i/o timeout' and 'context deadline exceeded' errors. kube-proxy logs on deleted nodes show graceful drain was requested; however, iptables rules and node-local DNS caches (node-local-dns enabled) sometimes show stale entries referencing IP addresses of deleted nodes. NetworkPolicy enforcement logs show endpoints moved during drain. Not all pods on the same node are affected; primarily newly scheduled pods on nodes created shortly after a scale-down event show DNS issues. Kubelet logs on a recently created node show transient CNI plugin errors during pod start.
Already attempted
Rolled CoreDNS to a higher replica count; upgraded CoreDNS image to a later patch (tested in staging); disabled node-local-dns temporarily (no effect). Increased CoreDNS upstream timeout and cache TTL. Tuned cluster-autoscaler scale-down delay to longer window to reduce churn. Recreated failed pods manually and they regained DNS. Captured tcpdump on node interfaces during failures and saw DNS UDP requests from pods that did not get replied to within the node's network stack timeframe occasionally.
Question
What targeted debugging steps can confirm whether DNS timeouts are caused by CNI race conditions during node replacement, leftover iptables/nft rules, node-local caching inconsistencies, or CoreDNS upstream saturation? Which reversible cluster-level configuration changes are safest to test in production to reduce or eliminate these transient DNS failures?
Verified community troubleshooting
No answers yet..
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags