-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
问题背景
场景一:
在多集群环境中,当要被调用的服务不在本集群中,如果不开启 smart dns,请求调用时会解析 host 失败。
场景二:
istio serviceentries 也是依赖 smart dns 解析的 host
这两种场景开启 lazyload 模式都会导致请求 host 解析失败。
您想要的解决方案
基本方案
在集群中有一个辅助域名服务,能解析所有集群的 svc host 与 service entries, 并添加到默认的 /etc/resolv.conf 中。
原本的 /etc/resolv.conf :
nameserver 172.20.0.10
search core.svc.cluster.local svc.cluster.local cluster.local vpc.internal ap-east-1.compute.internal
options ndots:5
假如辅助域名服务的 cluster ip 是 172.20.0.11, 新的 /etc/resolv.conf :
nameserver 172.20.0.10
nameserver 172.20.0.11
search core.svc.cluster.local svc.cluster.local cluster.local vpc.internal ap-east-1.compute.internal
options ndots:5
注意辅助域名服务 的 cluster ip 需要静态化指定。
您考虑过的替代方案
可选方案一: Global Sidecar 的 pilot-agent 做为 辅助域名服务
可选方案二: coredns 返回一个 fakeip
额外的上下文
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels