Resolve url from external DNS on kubernetes

6/28/2018

In my K8s cluster i've a pod who tried to resolved a url with DNS outwards of kubernetes. I dont have a choice i've to use this external DNS :( .

I overwrite /etc/resolv.conf in my pod but that doesn't change anything .

Do you have an idea or tutorial about how i can do it ?

-- morla
google-kubernetes-engine
kubernetes

1 Answer

6/29/2018

I overwrite /etc/resolv.conf in my pod but that doesn't change anything .

If for no other reason because that file is volume-mounted into your container, and very, very likely read on container start by the libraries it affects. IOW, you have modified it too late.

Do you have an idea or tutorial about how i can do it ?

PodSpec: dnsConfig and/or its dnsPolicy friend

-- mdaniel
Source: StackOverflow