Minor cleanups of CoreDNS issues and CI job (#4719)
* Minor cleanups * Add comment in docs that nodelocaldns cache is enabled by defaultpull/4731/head
parent
bf3c6aeed1
commit
8a5eae94ea
|
@ -114,10 +114,12 @@ The only exception is that ``hostNetwork: true`` PODs and non-k8s managed contai
|
||||||
cluster service names.
|
cluster service names.
|
||||||
|
|
||||||
## Nodelocal DNS cache
|
## Nodelocal DNS cache
|
||||||
Setting ``enable_nodelocaldns`` to ``true`` will make pods reach out to the dns (core-dns) caching agent running on the same node, thereby avoiding iptables DNAT rules and connection tracking. The local caching agent will query kube-dns / core-dns (depending on what main DNS plugin is configured in your cluster) for cache misses of cluster hostnames(cluster.local suffix by default).
|
Setting ``enable_nodelocaldns`` to ``true`` will make pods reach out to the dns (core-dns) caching agent running on the same node, thereby avoiding iptables DNAT rules and connection tracking. The local caching agent will query core-dns (depending on what main DNS plugin is configured in your cluster) for cache misses of cluster hostnames(cluster.local suffix by default).
|
||||||
|
|
||||||
More information on the rationale behind this implementation can be found [here](https://github.com/kubernetes/enhancements/blob/master/keps/sig-network/0030-nodelocal-dns-cache.md).
|
More information on the rationale behind this implementation can be found [here](https://github.com/kubernetes/enhancements/blob/master/keps/sig-network/0030-nodelocal-dns-cache.md).
|
||||||
|
|
||||||
|
**As per the 2.10 release, Nodelocal DNS cache is enabled by default.**
|
||||||
|
|
||||||
|
|
||||||
Limitations
|
Limitations
|
||||||
-----------
|
-----------
|
||||||
|
@ -129,9 +131,7 @@ Limitations
|
||||||
|
|
||||||
* There is
|
* There is
|
||||||
[no way to specify a custom value](https://github.com/kubernetes/kubernetes/issues/33554)
|
[no way to specify a custom value](https://github.com/kubernetes/kubernetes/issues/33554)
|
||||||
for the SkyDNS ``ndots`` param via an
|
for the SkyDNS ``ndots`` param.
|
||||||
[option for KubeDNS](https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-dns/app/options/options.go)
|
|
||||||
add-on, while SkyDNS supports it though.
|
|
||||||
|
|
||||||
* the ``searchdomains`` have a limitation of a 6 names and 256 chars
|
* the ``searchdomains`` have a limitation of a 6 names and 256 chars
|
||||||
length. Due to default ``svc, default.svc`` subdomains, the actual
|
length. Due to default ``svc, default.svc`` subdomains, the actual
|
||||||
|
|
|
@ -94,7 +94,7 @@ ingress_nginx_enabled: false
|
||||||
# ingress_nginx_configmap_tcp_services:
|
# ingress_nginx_configmap_tcp_services:
|
||||||
# 9000: "default/example-go:8080"
|
# 9000: "default/example-go:8080"
|
||||||
# ingress_nginx_configmap_udp_services:
|
# ingress_nginx_configmap_udp_services:
|
||||||
# 53: "kube-system/kube-dns:53"
|
# 53: "kube-system/coredns:53"
|
||||||
|
|
||||||
# Cert manager deployment
|
# Cert manager deployment
|
||||||
cert_manager_enabled: false
|
cert_manager_enabled: false
|
||||||
|
|
|
@ -7,6 +7,16 @@
|
||||||
resource: "deploy"
|
resource: "deploy"
|
||||||
state: absent
|
state: absent
|
||||||
when:
|
when:
|
||||||
- kubeadm_init is defined
|
- dns_mode in ['coredns', 'coredns_dual']
|
||||||
- kubeadm_init.changed|default(false)
|
- inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
||||||
|
- name: Kubernetes Apps | Delete kubeadm Kube-DNS service
|
||||||
|
kube:
|
||||||
|
name: "kube-dns"
|
||||||
|
namespace: "kube-system"
|
||||||
|
kubectl: "{{ bin_dir }}/kubectl"
|
||||||
|
resource: "svc"
|
||||||
|
state: absent
|
||||||
|
when:
|
||||||
|
- dns_mode in ['coredns', 'coredns_dual']
|
||||||
- inventory_hostname == groups['kube-master'][0]
|
- inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
{{ bin_dir }}/kubectl --kubeconfig /etc/kubernetes/admin.conf get secrets --all-namespaces
|
{{ bin_dir }}/kubectl --kubeconfig /etc/kubernetes/admin.conf get secrets --all-namespaces
|
||||||
-o 'jsonpath={range .items[*]}{"\n"}{.metadata.namespace}{" "}{.metadata.name}{" "}{.type}{end}'
|
-o 'jsonpath={range .items[*]}{"\n"}{.metadata.namespace}{" "}{.metadata.name}{" "}{.type}{end}'
|
||||||
| grep kubernetes.io/service-account-token
|
| grep kubernetes.io/service-account-token
|
||||||
| egrep 'default-token|kube-proxy|kube-dns|netchecker|weave|calico|canal|flannel|dashboard|cluster-proportional-autoscaler|tiller|local-volume-provisioner'
|
| egrep 'default-token|kube-proxy|coredns|netchecker|weave|calico|canal|flannel|dashboard|cluster-proportional-autoscaler|tiller|local-volume-provisioner'
|
||||||
register: tokens_to_delete
|
register: tokens_to_delete
|
||||||
when: needs_rotation
|
when: needs_rotation
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,8 @@ dns_min_replicas: 1
|
||||||
kube_encrypt_secret_data: true
|
kube_encrypt_secret_data: true
|
||||||
ingress_nginx_enabled: true
|
ingress_nginx_enabled: true
|
||||||
cert_manager_enabled: true
|
cert_manager_enabled: true
|
||||||
metrics_server_enabled: true
|
# Disable as health checks are still unstable and slow to respond.
|
||||||
|
metrics_server_enabled: false
|
||||||
metrics_server_kubelet_insecure_tls: true
|
metrics_server_kubelet_insecure_tls: true
|
||||||
kube_token_auth: true
|
kube_token_auth: true
|
||||||
kube_basic_auth: true
|
kube_basic_auth: true
|
||||||
|
|
Loading…
Reference in New Issue