<p>Kubernetes not able to resolve DNS. Container/Pods not able to access Internet.</p>

<p>I have a Kubernetes 2 node cluster on separate AWS EC2 instances (t2.Medium) container networking has been done using:
Flannel version: flannel:v0.10.0-amd64 (image)
Kubernetes version: 1.15.3</p>

<p>DNS Logs
<a href="https://i.stack.imgur.com/CzuxA.png" rel="nofollow noreferrer">DNS Logs</a></p>

<p><a href="https://i.stack.imgur.com/dVjXx.png" rel="nofollow noreferrer">nodes</a></p>

<p><a href="https://i.stack.imgur.com/Elg2a.png" rel="nofollow noreferrer">Kubernetes svc:</a></p>

<p><a href="https://i.stack.imgur.com/yX6UE.png" rel="nofollow noreferrer">enter image description here</a></p>

<p><a href="https://i.stack.imgur.com/yOv5I.png" rel="nofollow noreferrer">enter image description here</a></p>

<p>At times when I delete core-dns pods, the DNS issue gets resolved for some time but it is not consistant. Please suggest what can be done. I flannel mapping may have something to do with this. Please let me know if any other information is also needed. </p>

Manik Malhotra
<p>Errors such you get:  <code>nslookup: can't resolve 'kubernetes.default'</code> indicate that you have problem with the coredns/kube-dns add-on or associated Services.</p>

<p>Please check if you did following steps to debug DNS: <a href="https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/#check-if-the-dns-pod-is-running" rel="nofollow noreferrer">coredns</a>.</p>

<p>It also seems that like DNS inside busybox does not work properly.</p>

<p>Try to use busybox images &lt;= <strong>1.28.4</strong></p>

<p>Change pod configuration file:</p>

<pre><code>  containers:
  - name: busybox-image
    image: busybox:1.28.3
</code></pre>

<p>Learn more about most known dns kubernetes issues: <a href="https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/#known-issues" rel="nofollow noreferrer">kubernetes-dns</a>.</p>
