Skip to content

Commit

Permalink
Fixed #1
Browse files Browse the repository at this point in the history
Make sure kubeletes use `/run/systemd/resolve/resolv.conf` and not `/etc/resolv.conf` to make sure that any dnsmasq / resolved installed on the workers does not interfere with the clusters DNS resolution

Refs:
kubernetes/kubeadm#273
https://blog.sophaskins.net/blog/misadventures-with-kube-dns/
  • Loading branch information
asksven committed Sep 12, 2018
1 parent 4255bff commit bbf4d0a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion config/worker-0-kubelet.service
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ ExecStart=/usr/local/bin/kubelet \
--runtime-request-timeout=10m \
--tls-cert-file=/var/lib/kubelet/worker-0.pem \
--tls-private-key-file=/var/lib/kubelet/worker-0-key.pem \
--v=2
--v=2 \
--resolv-conf=/run/systemd/resolve/resolv.conf
Restart=on-failure
RestartSec=5

Expand Down
3 changes: 2 additions & 1 deletion config/worker-1-kubelet.service
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ ExecStart=/usr/local/bin/kubelet \
--runtime-request-timeout=10m \
--tls-cert-file=/var/lib/kubelet/worker-1.pem \
--tls-private-key-file=/var/lib/kubelet/worker-1-key.pem \
--v=2
--v=2 \
--resolv-conf=/run/systemd/resolve/resolv.conf
Restart=on-failure
RestartSec=5

Expand Down
3 changes: 2 additions & 1 deletion config/worker-2-kubelet.service
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ ExecStart=/usr/local/bin/kubelet \
--runtime-request-timeout=10m \
--tls-cert-file=/var/lib/kubelet/worker-2.pem \
--tls-private-key-file=/var/lib/kubelet/worker-2-key.pem \
--v=2
--v=2 \
--resolv-conf=/run/systemd/resolve/resolv.conf
Restart=on-failure
RestartSec=5

Expand Down
3 changes: 2 additions & 1 deletion scripts/generate-kubelet-service-file
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ ExecStart=/usr/local/bin/kubelet \\
--runtime-request-timeout=10m \\
--tls-cert-file=/var/lib/kubelet/worker-${i}.pem \\
--tls-private-key-file=/var/lib/kubelet/worker-${i}-key.pem \\
--v=2
--v=2 \\
--resolv-conf=/run/systemd/resolve/resolv.conf
Restart=on-failure
RestartSec=5
Expand Down

0 comments on commit bbf4d0a

Please sign in to comment.