Kubernetes - NameServer Limits exceeded error

I got this error description: Using kubeadm to init kubernetes 1.15.1 falied:node “xxx” not found After reboot the Ubuntu 18.04 server , checking journalctl -b , kubectl get events and journctl -u kubelet -n10 -r

../../../_images/nameserver.png

SEARCHING

> ./pkg/apis/core/validation/validation.go:2641: MaxDNSNameservers = 3

../../../_images/maxdns.png

Resolve

$ `sudo systemctl stop systemd-resolved.service`
$ `sudo systemctl disable systemd-resolved.service`

Removed /etc/systemd/system/multi-user.target.wants/systemd-resolved.service.
Removed /etc/systemd/system/dbus-org.freedesktop.resolve1.service.

## Remove the dns entries in

- **/etc/netplan/01-netcfg.yaml**
- **/etc/systemd/resolved.conf**
- **/etc/resolvconf/resolv.conf.d/base**
../../../_images/resolv.png
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: true
      dhcp6: false
      optional: true
      nameservers:
        addresses: [4.2.2.1, 4.2.2.2, 208.67.220.220]