在使用完全限定的名称之前,AKS、WIndows节点、dns不会解析服务



AKS集群,具有linux和windows的多个节点池。卡夫卡客户端:Confluent。Kafka 1.4.4

试图解析名为"的kafka服务;tt kafka kafka bootstrap。共享";。

来自窗口内吊舱-未能解决:

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

但是,如果我用svc.cluster.local限定服务地址,它会解决:

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-解决方案精细:

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

事实证明,windows无法在kubernetes中使用解析名称空间。

请参阅以下K8文档以了解有关Kubernetes中的Windows容器:https://kubernetes.io/docs/setup/production-environment/windows/intro-windows-in-kubernetes/#dns-限制

最新更新