1

I am looking for a way to use dnsPolicy = "Default" in kubernetes clusters I manage.

The docs mention that

DNS policies can be set on a per-pod basis. [...] These policies are specified in the dnsPolicy field of a Pod Spec.

Changing every PodSpec is a very costly operation for me. Is there another way to change the default dnsPolicy parameter globally for the cluster ?

Maybe via kubelet ?

Hakan Baba
  • 197
  • 1
  • 7
  • What version of Kubernetes you use? – Nick Rak Aug 29 '18 at 16:11
  • @nickrak i am at kubernetes 1.6. Both on the kubelet and apiserver side – Hakan Baba Aug 29 '18 at 16:13
  • Do you want to change `dnsPolicy` for each Pod in the cluster or only for a few specific ones ? – matt_j Mar 01 '21 at 17:25
  • I found a similar question to yours with a comprehensive answer: [How to set DNS Policy at Cluster Level](https://stackoverflow.com/questions/54677687/kubernetes-how-to-set-dns-policy-at-cluster-level). Does it answer your question ? – matt_j Mar 10 '21 at 16:40

0 Answers0