Set the record to the coredns
這兩天在處理 DNS 的問題, 看到可以直接在 CoreDNS 中塞 record. 這邊做個紀錄
多配置一組 DNS Server
1.:53 {
2 errors
3 health
4 kubernetes cluster.local in-addr.arpa ip6.arpa {
5 pods insecure
6 fallthrough in-addr.arpa ip6.arpa
7 }
8 prometheus :9153
9 forward . /etc/resolv.conf
10 cache 30
11 loop
12 reload
13 loadbalance
14}
15
16db.example.com.tw:53 {
17 errors
18 cache 30
19 hosts {
20 10.1.2.3 abc.example.com
21 fallthrough
22 }
23 reload
24}
配置 hosts
1.:53 {
2 errors
3 health
4 kubernetes cluster.local in-addr.arpa ip6.arpa {
5 pods insecure
6 fallthrough in-addr.arpa ip6.arpa
7 }
8 hosts {
9 127.0.0.1 localhost
10 ::1 localhost
11 10.1.2.3 abc.example.com
12 fallthrough
13 }
14 prometheus :9153
15 forward . /etc/resolv.conf
16 cache 30
17 loop
18 reload
19 loadbalance
20}
同時配置時
若同時配置時, 則會以 DNS Server 為優先.
comments powered by Disqus