DNS slow¶
Can be caused by myriad of reasons.
As of late the infameos ndots = 5
inside each pods /etc/resolv.conf
could be the culprit.
The fix is to override DNS on a pod level to be = 1 (it basically means how many dots in a hostname is required before it will not start looking in search domains - which can slow things down a lot of systems)
[...]
spec:
nodeSelector:
kubernetes.io/hostname: host04
dnsConfig:
options:
- name: ndots
value: "1"
containers:
- name: roundcube
[...]
Links / info about ndots ‘issue’¶
- https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/ (good for debugging coreDNS containers)
- https://blog.quentin-machu.fr/2018/06/24/5-15s-dns-lookups-on-kubernetes/ (good explantion)
- https://rsmitty.github.io/KubeDNS-Tweaks/
- https://github.com/kubernetes/kubernetes/issues/64924
- https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/