Sometimes we need to be able to resolve external ip addresses from within a pod. Let's say you run something like WordPress, Nextcloud etc. within Kubernetes, and you want to be able to access the internet to download and install a plugin.
A typical Kubernetes cluster running coredns will not allow you to do that based on default settings, because the developers did not see that as core task for coredns. It will take care for cluster-internal name resolution, so pods and services can talk to each other, and that is about it.
So if you have the need to resolve external addresses, you may need to add an external DNS server to your pod or deployment. In that case you add a dnsConfig section: to your yaml definition file
In this example, the name server is one of Google's public DNS servers, but you can use any you like, as long as it fits your needs. The pod will be able to resolve the required hostname to an ip address, and assuming your network allows it, your application within the pod can download required resources.