miniature-advantage-78722
10/28/2022, 2:48 PMdial tcp: lookup rancher.sam.intranet on 10.53.0.10:53: no such host
. Any ideas?sudo -i
- take sudo privileges
3. kubectl -n kube-system get configmaps rke2-coredns-rke2-coredns -o yaml
- get the current coredns config
4. Grab the Corefile field and format it from the string format it's found in to a normal file format (format newlines)
5. Edit the Corefile in a text editor. To add routing to an upstream DNS server for s specific subdomain I used:
sam.intranet:53 {
forward . 10.43.1.1:53
}
.:53 {
errors
health {
lameduck 5s
}
ready
kubernetes cluster.local cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
ttl 30
}
prometheus 0.0.0.0:9153
forward . /etc/resolv.conf
cache 30
loop
reload
loadbalance
}
6. kubectl -n kube-system edit configmaps rke2-coredns-rke2-coredns -o yaml
- edit the coredns config in vim
7. Delete the old Corefile values and replace with:
data:
Corefile: |
sam.intranet:53 {
forward . 10.43.1.1:53
}
.:53 {
errors
health {
lameduck 5s
}
ready
kubernetes cluster.local cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
ttl 30
}
prometheus 0.0.0.0:9153
forward . /etc/resolv.conf
cache 30
loop
reload
loadbalance
}
8. Wait ~30s for the auto reload in coredns