k8s kubernetes 里 ping 不通的问题

container 里面 ping 不通, 需要设置upstreamNameservers

在Ubuntul里,需要手动修改/etc/resolv.conf 修改为可用的dns

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 8.8.8.8 nameserver 8.8.8.4 nameserver 192.168.0.10 nameserver 114.114.114.114

参考:https://blog.yaakov.online/kubernetes-getting-pods-to-talk-to-the-internet/

转载于:https://my.oschina.net/wower/blog/1845838

你可能感兴趣的:(k8s kubernetes 里 ping 不通的问题)