CoreDNS添加自定义DNS解析记录

发表于 LINUX 分类,标签:

https://www.cnblogs.com/keithtt/p/13204497.html


apiVersion: v1
kind: ConfigMap
metadata:
  name: coredns
  namespace: kube-system
data:
  Corefile: |
    .:53 {
        errors
        health
        ready
        kubernetes cluster.local in-addr.arpa ip6.arpa {
           pods verified
           fallthrough in-addr.arpa ip6.arpa
           ttl 30
        }
        hosts {
            192.168.1.122  demo1.xx.com
            192.168.1.123  demo2.xx.com
            fallthrough
        }
        autopath @kubernetes
        prometheus :9153
        forward . /etc/resolv.conf {
            prefer_udp
            policy sequential
        }
        cache 30
        loop
        reload
        loadbalance
    }


0 篇评论

发表我的评论