<p>I've set up single node kubernetes  according to <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/" rel="noreferrer">official tutorial</a>. </p>

<p>In addition to official documentation I've set-up single node cluster:</p>

<pre><code>kubectl taint nodes --all node-role.kubernetes.io/master-
</code></pre>

<p>Disabled eviction limit:</p>

<pre><code>cat &lt;&lt; EOF &gt;&gt; /var/lib/kubelet/config.yaml
evictionHard:
  imagefs.available: 1%
  memory.available: 100Mi
  nodefs.available: 1%
  nodefs.inodesFree: 1%
EOF

systemctl daemon-reload
systemctl restart kubelet
</code></pre>

<p>And set systemd driver for Docker:</p>

<pre><code>cat &lt;&lt; EOF &gt; /etc/docker/daemon.json
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m"
  },
  "storage-driver": "overlay2"
}
EOF

systemctl daemon-reload
systemctl restart docker
</code></pre>

<p>I've tried following:</p>

<pre><code>docker build -t localhost:5000/my-image .
kubectl run -it --rm --restart=Always --image=localhost:5000/my-image my-image
</code></pre>

<p>But in pod logs I see <code>ImagePullBackOff</code>. If I setup local repository and I do <code>docker push localhost:5000/my-image</code> after I build image, then everything is working.</p>

<p>Is it is possible to use local images (which are already available after issuing <code>docker images</code>) without needing to setting up local repository, pushing to this repository and then pulling from it?</p>

Wakan Tanka
<p>You simply need to set the <code>imagePullPolicy</code> in your <code>Pod</code> template in the <code>container</code> specification to <code>Never</code>. Otherwise <strong>the kubelet</strong> will try to pull the image. The example <code>Pod</code> definition may look like this:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: test
spec:
  containers:
    - name: uses-local-image
      image: local-image-name
      imagePullPolicy: Never
</code></pre>

<p>More on that you can find <a href="https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images" rel="noreferrer">here</a>. </p>

<blockquote>
  <p>By default, the kubelet will try to pull each image from the specified
  registry. However, if the  <code>imagePullPolicy</code>  property of the
  container is set to  <code>IfNotPresent</code>  or  <code>Never</code>, then a local image
  is used (preferentially or exclusively, respectively).</p>
  
  <p>If you want to rely on pre-pulled images as a substitute for registry
  authentication, you must ensure all nodes in the cluster have the same
  pre-pulled images.</p>
  
  <p>This can be used to preload certain images for speed or as an
  alternative to authenticating to a private registry.</p>
  
  <p>All pods will have read access to any pre-pulled images.</p>
</blockquote>
