<p>We are taking the step to upgrade our infrastructure setup and are doing some R&amp;D with K8s.</p>
<p>We believe k8s is the solution we want to implement, however I've hit a brick wall.</p>
<p>I'm really struggling to get k8s to pull an image from a private registry that uses a hostname that does not exist.</p>
<p>I have followed instructions online and have successfully added a host record to coredns - I have verified it resolves correctly using throwaway containers, yet it seems like whenever I try to pull an image, I get the same error:</p>
<pre><code>Failed to pull image &quot;fake.host.uk/app&quot;: rpc error: code = Unknown desc = Error response from daemon: Get &quot;https://fake.host.uk/v2/&quot;: dial tcp: lookup fake.host.uk: no such host
</code></pre>
<p>Doing a <code>docker login fake.host.uk</code> works absolutely fine.
I can also see my added hosts via</p>
<p><code>kubectl run -it --rm --restart=Never --image=infoblox/dnstools:latest dnstools</code></p>
<p>Then running <code>ping fake.host.uk</code> brings back the correct IP.</p>
<p>However, trying to pull an image just doesn't work; how can I solve this problem?</p>

Matt
<p>DNS resolution needs to be setup for each node in your cluster, preferably by updating a common DNS server, but you can also update /etc/hosts on every node in the cluster. Kubernetes and docker pull images from the node and not from within a container, so they won't see the settings applied to things like coredns (it would create a circular dependency, how do you resolve the name of the coredns image's registry).</p>
