<p>I am trying to create a Kubernetes deployment from local docker images. And using imagePullPolicy as <strong>Never</strong> such that Kubernetes would pick it up from local docker image imported via tar.</p>
<p><strong>Environment</strong></p>
<ul>
<li>
<pre><code> SingleNodeMaster  # one node deployment
</code></pre>
</li>
</ul>
<p>But Kubernetes always trying to fetch the private repository although local docker images are present.</p>
<p>Any pointers on how to debug and resolve the issue such that Kubernetes would pick the images from the local docker registry? Thank you.</p>
<p><strong>Steps performed</strong></p>
<ul>
<li>docker load -i images.tar</li>
<li>docker images # displays images from myprivatehub.com/nginx/nginx-custom:v1.1.8</li>
<li>kubectl create -f local-test.yaml with imagepullPolicy as Never</li>
</ul>
<p><strong>Error</strong></p>
<pre><code>Pulling  pod/nginx-custom-6499765dbc-2fts2   Pulling image &quot;myprivatehub.com/nginx/nginx-custom:v1.1.8&quot; 
Failed   pod/nginx-custom-6499765dbc-2fts2   Error: ErrImagePull   
Failed   pod/nginx-custom-6499765dbc-2fts2   Failed to pull image &quot;myprivatehub.com/nginx/nginx-custom:v1.1.8&quot;: rpc error: code = Unknown desc = failed to pull and unpack image &quot;myprivatehub.com/nginx/nginx-custom:v1.1.8&quot;: failed to resolve reference &quot;myprivatehub.com/nginx/nginx-custom:v1.1.8&quot;: failed to do request: Head &quot;https://myprivatehub.com/v2/nginx/nginx-custom/manifests/v1.1.8&quot;: dial tcp: lookup myprivatehub.com: no such host
</code></pre>
<pre><code>docker pull &lt;imagename&gt;

Error response from daemon: Get https://myprivatehub.com/v2/: dial tcp: lookup myprivatehub.com on 172.31.0.2:53: no such host
</code></pre>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: nginx-custom
  namespace: default
spec:
  selector:
    matchLabels:
      run: nginx-custom
  replicas: 5 
  template:
    metadata:
      labels:
        run: nginx-custom
    spec:
      containers:
      - image: myprivatehub.com/nginx/nginx-custom:v1.1.8
        imagePullPolicy: Never
        name: nginx-custom
        ports:
        - containerPort: 80
</code></pre>

Mozhi
<p>This happens due to container runtime being different than docker. I am using containerd , after switching container runtime to docker , it started working.</p>
