By specifying nameservers in SkyDNS's config, for instance 8.8.8.8:53,8.8.4.4:53, you create a DNS forwarding proxy. In this case it round-robins between the two nameserver IPs mentioned.
Requests for which SkyDNS isn't authoritative will be forwarded and proxied back to the client. This means that you can set SkyDNS as the primary DNS server in /etc/resolv.conf and use it for both service discovery and normal DNS operations.
配置:
nameservers: forward DNS requests to these (recursive) nameservers (array of IP:port combination), when not authoritative for a domain. This defaults to the servers listed in /etc/resolv.conf. Also see no_rec.
环境变量:
SKYDNS_NAMESERVERS - set a list of nameservers to forward DNS requests to when not authoritative for a domain, "8.8.8.8:53,8.8.4.4:53". Overwrite with -nameservers string flag.
5 个回复
用心阁
赞同来自: ★榨菜★肉丝
应该设置DNS Forwarding吧。
DNS Forwarding
By specifying nameservers in SkyDNS's config, for instance 8.8.8.8:53,8.8.4.4:53, you create a DNS forwarding proxy. In this case it round-robins between the two nameserver IPs mentioned.
Requests for which SkyDNS isn't authoritative will be forwarded and proxied back to the client. This means that you can set SkyDNS as the primary DNS server in /etc/resolv.conf and use it for both service discovery and normal DNS operations.
配置:
nameservers: forward DNS requests to these (recursive) nameservers (array of IP:port combination), when not authoritative for a domain. This defaults to the servers listed in /etc/resolv.conf. Also see no_rec.
环境变量:
SKYDNS_NAMESERVERS - set a list of nameservers to forward DNS requests to when not authoritative for a domain, "8.8.8.8:53,8.8.4.4:53". Overwrite with -nameservers string flag.
zengshaoyong
赞同来自: 蓝蓝的小火苗
不好意思来挖坟了,请问这个问题解决了吗?我的也是PING 外部IP地址完全 没有问题,但是PING外部域名有时候不通
lethe3000
赞同来自:
我遇到类似问题,发现是dns的配置原因,实际是可以ping通外网ip的
wulonghui - PaaS工程师
赞同来自:
没有配置DNS,能访问访问么?
用心阁
赞同来自:
用docker inspect查看一下你的容器的DNS配置,我这里DNS服务器有两个,一个是集群内部的SkyDNS,一个是外面的DNS服务器,如8.8.8.8