Avoid resolv.conf file loopback for Flatcar distro

In Flatcar Container Linux versions at 2748.0 and later, configure the
kubelet to use an alternate DNS resolver configuration. Rather than
using the "/etc/resolv.conf" file, use systemd-resolved's
"/run/systemd/resolve/resolv.conf" file.

Without this configuration, pods like CoreDNS that use the "Default"
DNS policy wind up with a DNS forwarding loop.

Signed-off-by: Steven E. Harris <seh@panix.com>
This commit is contained in:
Steven E. Harris 2022-05-06 17:24:13 -04:00
parent 4088c739ff
commit 9300ac1ad5
No known key found for this signature in database
GPG Key ID: BB5463D8C93E1666
1 changed files with 3 additions and 0 deletions

View File

@ -99,6 +99,9 @@ func (d *Distribution) HasLoopbackEtcResolvConf() bool {
// Ubuntu > 16.04 has it
return d.version > 16.04
}
if d.project == "flatcar" {
return true
}
return false
}