Xu Gao
Xu Gao

Reputation: 1

CoreDNS In Kubernetes.How append domain name when forward?

I want to Ping a Nodename in a pod. By CoreDns forward to anothor Service that is current cluster's. When forwarding, append a domain name to source nodename, like searches in /etc/resolv.conf. How do I config yaml of coredns pod or corefile of coredns.

# in one pod
ping node1
# equivalent
ping node1.xxx.com

Upvotes: 0

Views: 2139

Answers (1)

Vasilii Angapov
Vasilii Angapov

Reputation: 9022

You have some misunderstanding on how DNS works. DNS server is not responsible for you "search" domains. DNS server has absolutely no idea of search domains because this is client side setting.

Read more for perfect explanation of pods DNS settings:

Upvotes: 1

Related Questions