<p>With k3d, I am receiving a DNS error when the pod tries to access a URL over the internet.</p>
<pre><code>ERROR:
getaddrinfo EAI_AGAIN DNS could not be resolved
</code></pre>
<p>How can I get past this error?</p>

Khushaboo Shandilya
<p>It depends on your context, OS, version.</p>
<p>For instance, you will see various proxy issue in <a href="https://github.com/k3d-io/k3d/issues/209" rel="nofollow noreferrer"><code>k3d-io/k3d</code> issue 209</a></p>
<p>this could be related to the way k3d creates the docker network.</p>
<blockquote>
<p>Indeed, k3d creates a custom docker network for each cluster and when this happens resolving is done through the docker daemon.<br />
The requests are actually forwarded to the DNS servers configured in your host's <code>resolv.conf</code>. But through a single DNS server (the embedded one of docker).</p>
<p>This means that if your daemon.json is, like mine, not configured to provide extra DNS servers it defaults to 8.8.8.8 which does not resolve any company address for example.</p>
<p>It would be useful to have a custom options to provide to k3d when it starts the cluster and specify the DNS servers there</p>
</blockquote>
<p>Which is why there is &quot;<a href="https://github.com/k3d-io/k3d/issues/220" rel="nofollow noreferrer">v3/networking: <code>--network</code> flag to attach to existing networks</a>&quot;, referring to <a href="https://k3d.io/v5.3.0/design/networking/" rel="nofollow noreferrer">Networking</a>.</p>
<p>Before that new flag:</p>
<blockquote>
<p>For those who have the problem, a simple fix is to mount your <code>/etc/resolve.conf</code> onto the cluster:</p>
<pre><code>k3d cluster create --volume /etc/resolv.conf:/etc/resolv.conf
</code></pre>
</blockquote>
