Kubernetes kube-dns fix nslookup error — Got recursion not available from…
Just an unharmed message ,but you can fix it too.
$ k exec -it deployments/debug -- bash
root@debug-f5bcbd446-zd4gt:/# nslookup echo
;; Got recursion not available from 10.96.0.10
Server: 10.96.0.10
Address: 10.96.0.10#53
Name: echo.default.svc.cluster.local
Address: 10.96.135.222
;; Got recursion not available from 10.96.0.10
Enable recursio response for nslookup, just update kube-dns/coredns ConfigMap:
header {
response set ra
}
example:
nick@nick-iot:~$ k describe cm -n kube-system coredns
Name: coredns
Namespace: kube-system
Labels: <none>
Annotations: <none>
Data
====
Corefile:
----
.:53 {
header {
response set ra
}
errors
health {
lameduck 5s
}
ready
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
ttl 30
}
prometheus :9153
forward . /etc/resolv.conf {
max_concurrent 1000
}
cache 30
loop
reload
loadbalance
}
Result:
$ k exec -it deployments/debug -- bash
root@debug-f5bcbd446-zd4gt:/# nslookup echo
Server: 10.96.0.10
Address: 10.96.0.10#53
Name: echo.default.svc.cluster.local
Address: 10.96.135.222
That is all.