<p>kubernetes has DNS resolution for service or pod. For example, if I log into a pod, I can access the services or pods via DNS name, like <code>mysvc.default.svc</code>.</p>
<p>But how can I access them by DNS directly from Kubernetes host?</p>
<p>Currently, I have to get the IP address in order to access the service, which is inconvenient.</p>
<p>Thanks!</p>

<p>You can not use kubernetes cluster DNS (CoreDNS) from outside kubernetes i.e from the host machine. You should expose the pod via ingress or loadbalancer or NodePort type service and configure an external DNS provider to resolve a hostname to the IP.</p>
