From 9300ac1ad589d87dd134f63013b4d10c61573afe Mon Sep 17 00:00:00 2001 From: "Steven E. Harris" Date: Fri, 6 May 2022 17:24:13 -0400 Subject: [PATCH] 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 --- util/pkg/distributions/distributions.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/pkg/distributions/distributions.go b/util/pkg/distributions/distributions.go index ab3a2302e3..5cfc2aad3a 100644 --- a/util/pkg/distributions/distributions.go +++ b/util/pkg/distributions/distributions.go @@ -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 }