Rancher node: Nameserver limits were exceeded, some nameservers have been omitted

2.1k views Asked by At

I was running into: Nameserver limits were exceeded, some nameservers have been omitted. I am experiencing this for my pods on two of my nodes. Three other nodes (their pods) don't have this issue.

The pods are configured with ClusterFirst dnsPolicy, so they got the nameserver of the node they are scheduled on.

/run/systemd/resolve/resolv.conf containted:
nameserver 2a01:xxx:xxxx::add:1
nameserver 2a01:xxx:xxxx::add:2
nameserver 185.XX.XX.X
Too many DNS servers configured, the following entries may be ignored.
nameserver 185.XX.XX.X

I was able to remove the two IPv6 addresses via /etc/netplan/50-cloud-init.yaml as of course the default limit is 3 https://www.reddit.com/r/kubernetes/comments/7ruq0f/kubelet_nameserver_limits_were_exceeded/

What is the best way to solve this within Kubernetes?

This does not feel the best way to me: https://stackoverflow.com/a/70969023/1766764

My other nodes don't need this and diffing the node yaml files did not reveal any differences in this direction (no nameserver explicitly configured).

Ubuntu 20.4 and Rancher v1.19.6-rancher1-1 is used
1

There are 1 answers

0
BBK On

I got a similar case with the DualStack network with DHCP for both IPv4 & IPv6, and both were advertising two nameservers each, resulting in 4 nameservers on the host. And k8s DNS is pulling nameservers from the host.

After removing one DNS nameserver from the router's configuration for each IPv4 & IPv6 DHCP server, the message "Nameserver limits were exceeded, some nameservers have been omitted" disappeared.