1.ack的hosts不会继承宿主机的hosts,而工作中有一个域名默认是走内网解析,内网被限制访问了,只能在coreDNS中加一个hosts解析域名
2.编辑configmap (coredns)
kubectl edit configmap -n kube-system coredns
增加hosts节点
Corefile: |.:53 {errorshealth {lameduck 5s}readykubernetes cluster.local in-addr.arpa ip6.arpa {pods insecurefallthrough in-addr.arpa ip6.arpa}hosts {192.168.11.241 www.girls.cn192.168.11.240 harbor.girls.cnfallthrough}prometheus :9153forward . "/etc/resolv.conf"cache 30loopreloadloadbalance}
3.使用命令行添加过程中一直报错无法添加,后来通过图形界面添加了
.:53 {errorshealth :10260 {lameduck 15s}readykubeapik8s_event {level info error warning}kubernetes cluster.local in-addr.arpa ip6.arpa {pods insecurettl 30fallthrough in-addr.arpa ip6.arpa}hosts {47.106.191.109 osale.gemdale.comfallthrough}prometheus :9153forward . /etc/resolv.conf {prefer_udp}cache 30logloopreloadloadbalance
}