add k8s_external plugin to CoreDNS configuration (#4704)
This commit is contained in:
parent
d9dedc2cd5
commit
99c5f7e013
4 changed files with 12 additions and 0 deletions
|
@ -61,6 +61,10 @@ following default cluster parameters:
|
||||||
bits in kube_pods_subnet dictates how many kube-nodes can be in cluster.
|
bits in kube_pods_subnet dictates how many kube-nodes can be in cluster.
|
||||||
* *skydns_server* - Cluster IP for DNS (default is 10.233.0.3)
|
* *skydns_server* - Cluster IP for DNS (default is 10.233.0.3)
|
||||||
* *skydns_server_secondary* - Secondary Cluster IP for CoreDNS used with coredns_dual deployment (default is 10.233.0.4)
|
* *skydns_server_secondary* - Secondary Cluster IP for CoreDNS used with coredns_dual deployment (default is 10.233.0.4)
|
||||||
|
* *enable_coredns_k8s_external* - If enabled, it configures the [k8s_external plugin](https://coredns.io/plugins/k8s_external/)
|
||||||
|
on the CoreDNS service.
|
||||||
|
* *coredns_k8s_external_zone* - Zone that will be used when CoreDNS k8s_external plugin is enabled
|
||||||
|
(default is k8s_external.local)
|
||||||
* *cloud_provider* - Enable extra Kubelet option if operating inside GCE or
|
* *cloud_provider* - Enable extra Kubelet option if operating inside GCE or
|
||||||
OpenStack (default is unset)
|
OpenStack (default is unset)
|
||||||
* *kube_hostpath_dynamic_provisioner* - Required for use of PetSets type in
|
* *kube_hostpath_dynamic_provisioner* - Required for use of PetSets type in
|
||||||
|
|
|
@ -135,6 +135,9 @@ dns_mode: coredns
|
||||||
enable_nodelocaldns: true
|
enable_nodelocaldns: true
|
||||||
nodelocaldns_ip: 169.254.25.10
|
nodelocaldns_ip: 169.254.25.10
|
||||||
nodelocaldns_health_port: 9254
|
nodelocaldns_health_port: 9254
|
||||||
|
# Enable k8s_external plugin for CoreDNS
|
||||||
|
enable_coredns_k8s_external: false
|
||||||
|
coredns_k8s_external_zone: k8s_external.local
|
||||||
|
|
||||||
# Can be docker_dns, host_resolvconf or none
|
# Can be docker_dns, host_resolvconf or none
|
||||||
resolvconf_mode: docker_dns
|
resolvconf_mode: docker_dns
|
||||||
|
|
|
@ -30,6 +30,9 @@ data:
|
||||||
forward . /etc/resolv.conf {
|
forward . /etc/resolv.conf {
|
||||||
prefer_udp
|
prefer_udp
|
||||||
}
|
}
|
||||||
|
{% endif %}
|
||||||
|
{% if enable_coredns_k8s_external %}
|
||||||
|
k8s_external {{ coredns_k8s_external_zone }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
cache 30
|
cache 30
|
||||||
loop
|
loop
|
||||||
|
|
|
@ -89,6 +89,8 @@ kube_dns_servers:
|
||||||
|
|
||||||
dns_servers: "{{kube_dns_servers[dns_mode]}}"
|
dns_servers: "{{kube_dns_servers[dns_mode]}}"
|
||||||
|
|
||||||
|
enable_coredns_k8s_external: false
|
||||||
|
coredns_k8s_external_zone: k8s_external.local
|
||||||
|
|
||||||
# Kubernetes configuration dirs and system namespace.
|
# Kubernetes configuration dirs and system namespace.
|
||||||
# Those are where all the additional config stuff goes
|
# Those are where all the additional config stuff goes
|
||||||
|
|
Loading…
Reference in a new issue