If you are using kubernetes, you could ship resolv.conf to the pod ( in turn for all the containers running in a pod ). Please refer DNS for Services and Pods - Kubernetes
Something similar from previous thread Static pods have host's resolv.conf after HA Installation with kubeadm