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-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 %}
|
|
|
|
upstream {{ upstream_dns_servers|join(' ') }}
|
|
|
|
{% 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 %}
|
|
|
|
proxy . {{ upstream_dns_servers|join(' ') }}
|
|
|
|
{% else %}
|
2018-03-13 19:00:05 +08:00
|
|
|
proxy . /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
|
|
|
}
|