k8s pod里访问不到外部ip_kubernetes dns设置之后,pod中的container无法访问外网的问题...
应该设置DNS Forwarding吧。DNS ForwardingBy 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 name
应该设置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.
更多推荐
所有评论(0)