34 lines
907 B
Django/Jinja
34 lines
907 B
Django/Jinja
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: coredns
|
|
namespace: kube-system
|
|
labels:
|
|
addonmanager.kubernetes.io/mode: EnsureExists
|
|
data:
|
|
Corefile: |
|
|
.:53 {
|
|
errors
|
|
health
|
|
kubernetes {{ dns_domain }} in-addr.arpa ip6.arpa {
|
|
pods insecure
|
|
{% if resolvconf_mode == 'host_resolvconf' and upstream_dns_servers is defined and upstream_dns_servers|length > 0 %}
|
|
upstream {{ upstream_dns_servers|join(' ') }}
|
|
{% else %}
|
|
upstream /etc/resolv.conf
|
|
{% endif %}
|
|
fallthrough in-addr.arpa ip6.arpa
|
|
}
|
|
prometheus :9153
|
|
{% if resolvconf_mode == 'host_resolvconf' and upstream_dns_servers is defined and upstream_dns_servers|length > 0 %}
|
|
forward . {{ upstream_dns_servers|join(' ') }}
|
|
{% else %}
|
|
forward . /etc/resolv.conf
|
|
{% endif %}
|
|
cache 30
|
|
loop
|
|
reload
|
|
loadbalance
|
|
}
|