Update 'k3s: enable DNS resolution from host to k3s services'

Andy 2023-01-24 13:53:14 +00:00
parent 0d98c4f9f2
commit d481509be4

@ -2,6 +2,7 @@ The following enables DNS resolution from host to k3s services for `default.svc.
``` ```
sudo mkdir -p /etc/systemd/resolved.conf.d sudo mkdir -p /etc/systemd/resolved.conf.d
cat <<EOF | sudo tee /etc/systemd/resolved.conf.d/k3s-kube-dns.conf cat <<EOF | sudo tee /etc/systemd/resolved.conf.d/k3s-kube-dns.conf
[Resolve] [Resolve]
DNS=$(kubectl -n kube-system get ep kube-dns -o jsonpath='{.subsets[0].addresses[0].ip}') DNS=$(kubectl -n kube-system get ep kube-dns -o jsonpath='{.subsets[0].addresses[0].ip}')