【K8S】基於coredns配置自定義域名類似配置HOST


 

配置步驟

集群(system)-資源(配置映射)-名稱空間kube-system(coredns)

1)進入集群(system)

2)選擇資源(配置映射)

3)找到名稱空間kube-system下的coredns

4)對coredns進行編輯-添加host

.:53 {
    errors
    health
    ready
    kubernetes cluster.local in-addr.arpa ip6.arpa {
      pods insecure
      fallthrough in-addr.arpa ip6.arpa
    }
    prometheus :9153 hosts { 10.211.55.24 gitlab.zbq.com 10.211.55.19 harbor.zbq.com fallthrough }
    forward . "/etc/resolv.conf"
    cache 30
    loop
    reload
    loadbalance
}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM