Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果在 pod 规范中将 hostNetwork 设置为 true,它会收到与 host 相同的 IP 地址。虽然可以使用此 ip 访问 pod,但我无法通过服务访问 pod。如果我在服务中将 clusterIP 设置为 None,则 dns 查找不会返回任何结果。如果分配了 clusterIP,则流量不会重定向到后端 pod。
(肯定错了,误解了问题)问题出在/etc/resolv.conf
使用 hostNetwork=true 时,您将获得主机的 dns 服务器,但那里没有集群 dns。
在 github 上跟踪问题