AKS Cluster with multiple node pools of linux and windows. Kafka Client: Confluent.Kafka 1.4.4
Trying to resolve a kafka service named "tt-kafka-kafka-bootstrap.shared".
From with in windows pod - FAILS TO RESOLVE:
kubectl exec -it test-print-7f6b64dc4f-4z7lt --namespace test -- nslookup tt-kafka-kafka-bootstrap.shared
Server: kube-dns.kube-system.svc.cluster.local
Address: 10.0.0.10
*** kube-dns.kube-system.svc.cluster.local can't find tt-kafka-kafka-bootstrap.shared: Non-existent domain
BUT IF I QUALIFY THE SERVICE ADDRESS WITH svc.cluster.local, IT RESOLVES:
kubectl exec -it test-print-7f6b64dc4f-4z7lt --namespace test -- nslookup tt-kafka-kafka-bootstrap.shared.svc.cluster.local
Server: kube-dns.kube-system.svc.cluster.local
Address: 10.0.0.10
Name: tt-kafka-kafka-bootstrap.shared.svc.cluster.local
Address: 10.0.192.149
FROM With in LINUX POD - RESOLVES FINE:
root@test-worker-t1-0:/app# nslookup tt-kafka-kafka-bootstrap.shared
Server: 10.0.0.10
Address: 10.0.0.10#53
Name: tt-kafka-kafka-bootstrap.shared.svc.cluster.local
Address: 10.0.192.149
It turns out windows can not resolve name spaces with in the kubernetes.
Please refer to following K8 documentation for more information on Windows containers in Kubernetes: https://kubernetes.io/docs/setup/production-environment/windows/intro-windows-in-kubernetes/#dns-limitations