Im overriding the the dns policy of a pod since I'm facing a issue with default /etc/resolv.conf
of the pod. Another issue is that the pod is not able to connect to smtp server server due to default /etc/resolv.conf
of the pod
Hence the dnspolicy that is desired to be applied to the deployment/pod is:
dnsConfig:
nameservers:
- <ip-of-the-node>
options:
- name: ndots
value: '5'
searches:
- monitoring.svc.cluster.local
- svc.cluster.local
- cluster.local
dnsPolicy: None
In the above configuration the nameservers
needs to be IP of the node where pod gets deployed. Since I have three worker nodes, I cannot hard-code the value to specific worker node's IP. I would not prefer configuring the pod to get deployed to particular node since if the resources are not sufficient for the pod to get deployed in a particular node, the pod might remain in pending state.
How can I make the nameservers
to get value of the IP address of the node where pod gets deployed?
Or is it possible to update the nameservers
with some kind a of a generic argument so that the pod will be able to connect to smtp server.
/bin/sh: can't create /etc/resolv.conf: Permission denied
. Im using imagegrafana:7.1.5
which is having securityContextfsGroup
andrunAsUser
as472
. – Billen