I'm running Rocky Linux 8 and trying to set up a single-node cluster for Kafka that requires ZooKeeper. While ZooKeeper is working fine, I keep hitting a "No route to host" error when starting Kafka, indicating it can't connect to ZooKeeper. I've noticed errors with CoreDNS that read: [ERROR] plugin/errors: 2 kafka-svc.reddog.microsoft.com. AAAA: read udp 10.244.77.165:56358->172.19.0.126:53: read: no route to host and similar i/o timeout messages. I'm using Kubeadm for managing the cluster and need help troubleshooting this issue.
3 Answers
There’s likely something wrong with the routing to that IP. The error indicates the host isn’t reachable. You could try attaching a debug container to your Kafka bootstrap to check connectivity. If something in your setup has changed, a simple restart of your CoreDNS deployment might clear that up. Also, check your Kubelet settings, specifically the clusterDomain.
It seems like you might have a network issue between your Kafka pod and ZooKeeper. The CoreDNS errors suggest that your pods can't reach the DNS server at 172.19.0.126, which often points to a problem with your CNI plugin. Make sure that your CNI is installed and running correctly. Restarting the pods or even rebooting the node could help, but you may need to dig deeper into your Kubernetes network setup if that doesn’t fix it.
This kind of problem usually happens when the pod network isn't configured correctly, causing DNS lookups to fail. Since you're using kubeadm, take a look at your CNI plugin's status. Run `kubectl get pods -n kube-system` to check if anything is in CrashLoopBackOff or not running. If everything looks fine, try running `nslookup` inside your Kafka pod to see if it can resolve service names. That’ll help narrow down whether it's a network issue or a CoreDNS problem. Also, check if there's anything blocking the 172.19.0.126 address, like firewall settings.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures