无法使用ServiceName或DomainName在POD中访问POD中的clusterip_service或Internet
我有 2 pods
(pod1,pod2),带有 2 Services
(Service1 Links Pod1,service2 links POD2)在同一名称空间中。
在POD1中,我在测试下进行了。我使用 kubectl exec ...
和
使用
,我使用wget> wget pod2ipaddress
- 成功kubectlexec。
-
调用RESTAPI在POD2中暴露于POD2中使用
调用RESTAPIWGET> WGET SERVICE2IPADDRESS
Success> Success> - Success -
调用RESTAPI在POD2中暴露于POD2中使用
WGET SERVICE2NAME
无法解决pcgameSapp -service -service -service -service -service -service -service -service -service -service -service -service -service -service -service -service -service -service host: -
curl https://www.google.com
- 消息失败无法解析主机:www.google.com
- Initalises K8S群集(v1.22.9),带有1个主节点和1个Workernode,
ubuntu 20.04
使用kubeadm
in AWS EC2虚拟机 weavenet
用于网络的插件
我跟踪了 kube-dns
日志,但
curl serviceName的请求信息
do 中的do not by
kube-dns
日志
kubectl logs -namespace = kube-system -l k8s-app = kube-dns
我遵循 dns-debugging-resolution 文档,但是我无法
从阅读以前的答案中找出一个解决方案,我假设存在一些问题使用 coredns
或 iptables
...等。但是我无法为这个问题找出解决方案。
请建议
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过另一个平台从一个名为
felix-dpg
(@fdpg)的成员收到了解决方案。我添加了下面的解决方案详细信息,其中与“必须为主节点打开哪些端口和Worker节点”有关的信息在此链接
端口详细信息在此链接
最初我不开放(6783,6784)TCP,(6783,6784)UDP的UDP端口和UDP的端口53(启用群集中的NODES中的undp port 53) )。我在这个问题中报告的问题通过
打开针对主节点开放的Weavenet和UDP 端口的端口而解决了问题。
为工人节点打开的端口
如果您对上述详细信息有任何疑问或疑虑,请告诉我。谢谢
i received the solution from a member named
felix-dpg
(@fdpg in stackoverflow) through another platform. i have added the solution details belowThe information related to "which ports has to be opened for master node and worker node" are in this link
The weavenet port details are in this link
Initially i didnot open (6783,6784)TCP,(6783,6784)UDP ports for Weavenet and port 53 for UDP(to enable inter-communication among the nodes in the cluster). The issue which i reported in this question got resolved by opening the ports for Weavenet and UDP
Ports opened for Master node

Ports opened for Worker node

Please let me know if you have any doubts or concerns with the above details. Thank you