Skip to content

Instantly share code, notes, and snippets.

@lots0logs
Created May 9, 2020 02:38
Show Gist options
  • Save lots0logs/c9bab658c8ae821e4a8846621478a1ba to your computer and use it in GitHub Desktop.
Save lots0logs/c9bab658c8ae821e4a8846621478a1ba to your computer and use it in GitHub Desktop.
K8s :: DigitalOcean :: Ubuntu 20.04 :: Workaround For "too many nameservers" Warning Message Log Spam
#cloud-config
runcmd:
# BEGIN Fix "too many nameservers" warning spammed to logs by K8s.
- sed -i 's|nameserver|#nameserver|g' /etc/resolv.conf
- echo 'nameserver 1.1.1.1' >> /etc/resolv.conf
- sed -i 's|nameserver|#nameserver|g' /var/run/systemd/resolve/resolv.conf
- echo 'nameserver 1.1.1.1' >> /var/run/systemd/resolve/resolv.conf
# END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment