修改 coredns configmap,添加
hosts {
120.241.21.12 api.mch.weixin.qq.com
36.155.207.147 yun.tim.qq.com
fallthrough
}

kind: ConfigMap
apiVersion: v1
metadata:
  name: coredns
  namespace: kube-system
data:
  Corefile: |
    .:53 {
        errors
        health
        ready
        kubernetes cluster.local. in-addr.arpa ip6.arpa {
          pods insecure
          fallthrough in-addr.arpa ip6.arpa
        }
        prometheus :9153
        forward . /etc/resolv.conf
        cache 30
        reload
        loadbalance
        hosts {
          120.241.21.12 api.mch.weixin.qq.com
          36.155.207.147 yun.tim.qq.com
          fallthrough 
        }
    }
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐