Skip to content

Commit

Permalink
Fix DNS loop on Ubuntu 18.04 (Bionic)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciprian Hacman committed Jan 16, 2020
1 parent 136fe7a commit 162761c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nodeup/pkg/model/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,12 @@ func (b *KubeletBuilder) buildKubeletConfigSpec() (*kops.KubeletConfigSpec, erro
}
}

// In certain configurations systemd-resolved will put the loopback address 127.0.0.53 as a nameserver into /etc/resolv.conf
// https://github.com/coredns/coredns/blob/master/plugin/loop/README.md#troubleshooting-loops-in-kubernetes-clusters
if b.Distribution == distros.DistributionBionic && c.ResolverConfig == nil {
c.ResolverConfig = s("/run/systemd/resolve/resolv.conf")
}

// As of 1.16 we can no longer set critical labels.
// kops-controller will set these labels.
// For bootstrapping reasons, protokube sets the critical labels for kops-controller to run.
Expand Down

0 comments on commit 162761c

Please sign in to comment.