0
votes

When running some pod, I'd like to insert customized DNS search strings into it. The default behavior seems to be host /etc/resolv.conf plus things like svc.cluster.local, etc. The API pod spec doesn't mention anything about this. I'm also looking at CNI interface but at this moment I'm not clear how the extra DNS search string are passed into plugins like flannel.

So is it possible (and how) to add a customized DNS search string to a pod?

1
It looks like it'll be configured for the whole cluster. I was more looking for an individual podlang2

1 Answers

2
votes

An option could be creating a namespace where that dns record would be available. You can do this by using the link shared by Mark O'Connor in the comment and adding the namespace option. Then you would also need to create the pod in that namespace. The thing is, how does this pod interact with the rest of the appliances in the cluster? You may need to use the FQDN for some of the services:

https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#namespaces-and-dns