Next to kubedns and CoreDNS itself, support setting nodelocal option as released in https://github.com/kubernetes/kubernetes/pull/70555 for v1.13
Hey @superseb ,
Is there a workaround by tweaking a file or configMap for the time being?
My use case is that we use dnsmasq on the host as well to resolve internal domains by pointing to specific nameservers. In order to do that, I need to have IP 172.17.0.1 (default) in /etc/resolv.conf of the docker container.
We should add this as an option in k8s 1.15-k8s 1.18 templates for when we release 2.4 but not turned on by default.
Available with v1.1.0-rc10
Can be tested using:
dns:
provider: coredns
nodelocal:
ip_address: "169.254.20.10"
Things to test:
--cluster-dns on the kubelet container should be set to this addressthe enhancement is validated with RKE version v1.1.0-rc10
>./rke -v
rke version v1.1.0-rc10
Use RKE to provision a cluster with the following yml file
nodes:
- address:
internal_address:
user: ubuntu
role: [etcd, controlplane, worker]
ssh_key_path:
- address:
internal_address:
user: ubuntu
role: [etcd, controlplane, worker]
ssh_key_path:
- address:
internal_address:
user: ubuntu
role: [etcd, controlplane, worker]
ssh_key_path:
dns:
provider: coredns
nodelocal:
ip_address: "169.254.20.10"
Do the following checks on the cluster:
node-local-dns is deployed in the cluster > k get daemonsets.apps -n kube-system
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
canal 3 3 3 3 3 <none> 20m
node-local-dns 3 3 3 3 3 <none> 20m
--cluster-dns on the kubelet container should be set to designated address (need to ssh into nodes)ubuntu@ip-172-31-25-27:~$ docker inspect kubelet | grep -e 'cluster-dns'
"--cluster-dns=169.254.20.10",
"--cluster-dns=169.254.20.10",
This is also validated in rancher:master-head 8ede17d10
k8s version:
Most helpful comment
We should add this as an option in k8s 1.15-k8s 1.18 templates for when we release 2.4 but not turned on by default.