<p>Unable to use Kubernetes internal DNS when <code>hostNetwork</code> is used:</p>
<pre><code>/ test# nslookup echo
Server:    10.96.0.10
Address 1: 10.96.0.10

nslookup: can't resolve 'echo'
</code></pre>
<p>Without <code>hostNetwork</code>:</p>
<pre><code>/ test# nslookup echo
Server:    10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local

Name:      echo
Address 1: 10.98.232.198 echo.default.svc.cluster.local
</code></pre>
<p>Kubernetes 1.18.5 on bare-metal not upgraded (fresh install).</p>
<p>Full config:</p>
<pre><code>apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: test
  labels:
    app: test

spec:
  selector:
    matchLabels:
      app: test

  template:
    metadata:
      labels:
        app: test

    spec:
      hostNetwork: true
      dnsPolicy: ClusterFirstWithHostNet

      containers:
      - image: busybox:1.28
        command:
          - sleep
          - &quot;3600&quot;
        imagePullPolicy: IfNotPresent
        name: busybox

---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: echo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: echo
  template:
    metadata:
      labels:
        app: echo
    spec:
      containers:
        - name: echo
          image: jmalloc/echo-server
          ports:
            - name: http-port
              containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: echo
spec:
  ports:
    - name: http-port
      port: 80
      targetPort: http-port
      protocol: TCP
  selector:
    app: echo
</code></pre>

<p>A fresh install of Kubernetes 1.19.0 solved this problem.</p>
