2018-03-13 19:00:05 +08:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: coredns
|
2018-03-30 19:29:13 +08:00
|
|
|
namespace: kube-system
|
2018-11-16 01:52:12 +08:00
|
|
|
labels:
|
|
|
|
addonmanager.kubernetes.io/mode: EnsureExists
|
2018-03-13 19:00:05 +08:00
|
|
|
data:
|
|
|
|
Corefile: |
|
|
|
|
.:53 {
|
|
|
|
errors
|
|
|
|
health
|
2018-06-14 02:52:35 +08:00
|
|
|
kubernetes {{ dns_domain }} in-addr.arpa ip6.arpa {
|
2018-03-13 19:00:05 +08:00
|
|
|
pods insecure
|
2018-10-08 22:08:51 +08:00
|
|
|
{% if resolvconf_mode == 'host_resolvconf' and upstream_dns_servers is defined and upstream_dns_servers|length > 0 %}
|
2019-03-27 02:09:17 +08:00
|
|
|
upstream {{ upstream_dns_servers.join(' ') }}
|
2018-10-08 22:08:51 +08:00
|
|
|
{% else %}
|
2018-03-13 19:00:05 +08:00
|
|
|
upstream /etc/resolv.conf
|
2018-10-08 22:08:51 +08:00
|
|
|
{% endif %}
|
2018-03-13 19:00:05 +08:00
|
|
|
fallthrough in-addr.arpa ip6.arpa
|
|
|
|
}
|
|
|
|
prometheus :9153
|
2018-10-08 22:08:51 +08:00
|
|
|
{% if resolvconf_mode == 'host_resolvconf' and upstream_dns_servers is defined and upstream_dns_servers|length > 0 %}
|
2019-04-04 15:40:50 +08:00
|
|
|
forward . {{ upstream_dns_servers.join(' ') }}
|
2018-10-08 22:08:51 +08:00
|
|
|
{% else %}
|
2019-04-04 15:40:50 +08:00
|
|
|
forward . /etc/resolv.conf
|
2018-10-08 22:08:51 +08:00
|
|
|
{% endif %}
|
2018-03-13 19:00:05 +08:00
|
|
|
cache 30
|
2018-10-11 15:12:58 +08:00
|
|
|
loop
|
|
|
|
reload
|
|
|
|
loadbalance
|
2018-03-13 19:00:05 +08:00
|
|
|
}
|