Why do I need to add nameservers to resolv.conf?

Solution 1:

Systemd comes with a "stub" resolver, systemd-resolved, which according to them is not actually meant to be used as a DNS server:

Well, resolved is not supposed to be a DNS server, it's supposed to be exactly good enough so that libc-like DNS clients can resolve their stuff, and we carry enough info for the AD bit to be set.

For whatever reason, Ubuntu is configured to use it as a DNS server and, in fact, the only one.

A comment on bug #1624320 points out that systemd-resolved has three modes of operation, and the second one is what fixed my problem. Namely:

$ sudo rm -f /etc/resolv.conf
$ sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf