<p>I have successfully built Docker images and ran them in a Docker swarm.  When I attempt to build an image and run it with Docker Desktop's Kubernetes cluster:</p>

<pre><code>docker build -t myimage -f myDockerFile .
</code></pre>

<p>(the above successfully creates an image in the docker local registry)</p>

<pre><code>kubectl run myapp --image=myimage:latest
</code></pre>

<p>(as far as I understand, this is the same as using the kubectl create deployment command)</p>

<p>The above command successfully creates a deployment, but when it makes a pod, the pod status always shows:</p>

<pre><code>NAME                                   READY  STATUS            RESTARTS  AGE 
myapp-&lt;a random alphanumeric string&gt;   0/1    ImagePullBackoff  0         &lt;age&gt;
</code></pre>

<p>I am not sure why it is having trouble pulling the image - does it maybe not know where the docker local images are?</p>

<p>I just had the exact same problem.  Boils down to the <code>imagePullPolicy</code>:</p>

<pre><code>PC:~$ kubectl explain deployment.spec.template.spec.containers.imagePullPolicy
KIND:     Deployment
VERSION:  extensions/v1beta1

FIELD:    imagePullPolicy &lt;string&gt;

DESCRIPTION:
     Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always
     if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated.
     More info:
     https://kubernetes.io/docs/concepts/containers/images#updating-images
</code></pre>

<p>Specifically, the part that says: <em>Defaults to Always if :latest tag is specified</em>.</p>

<p>That means, you created a local image, but, because you use the <code>:latest</code> it will try to find it in whatever remote repository you configured (by default docker hub) rather than using your local.  Simply change your command to:</p>

<pre><code>kubectl run myapp --image=myimage:latest --image-pull-policy Never
</code></pre>

<p>or</p>

<pre><code>kubectl run myapp --image=myimage:latest --image-pull-policy IfNotPresent
</code></pre>
