编辑configmap (coredns)
kubectl edit configmap -n kube-system coredns
增加hosts节点
Corefile: |
.:53 {
errors
health {
lameduck 5s
}
ready
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
}
hosts {
192.168.11.241 www.girls.cn
192.168.11.240 harbor.girls.cn
fallthrough
}
prometheus :9153
forward . "/etc/resolv.conf"
cache 30
loop
reload
loadbalance
}