<p>Please see my images below:</p>

<p><a href="https://i.stack.imgur.com/K03a6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K03a6.png" alt="enter image description here"></a></p>

<p>I then run this:</p>

<pre><code>kubectl run my-app --image=iansimage:latest --port=5000
</code></pre>

<p>and this:</p>

<pre><code>kubectl expose deployment my-app --type=LoadBalancer --port=8080 --target-port=5000
</code></pre>

<p>However, I then see this:</p>

<p><a href="https://i.stack.imgur.com/q94e9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q94e9.png" alt="enter image description here"></a></p>

<p>Notice the warning in the above screenshot: "Error response from daemon: pull access denied for iansimage, repository does not exist or may require 'docker login': denied: requested access to the resource is denied".  </p>

<p>Why is Kubectl trying to find iansimage:latest  on the internet? iansimage:latest  is a local image I created as per my last question: <a href="https://stackoverflow.com/questions/60932424/create-an-image-from-a-dockerfile/60932772?noredirect=1#comment107806770_60932772">Create an image from a Dockerfile</a></p>

<p>Please note that I am new to Kubernetes so this may be simple?</p>

<p><strong>Update</strong></p>

<p>Following on from Burak Serdars's comment.  Say I have a com,and like this, which would nomally build an image: <code>docker build -t "app:latest" .</code></p>

<p>How would I build this image inside a Kubernetes pod?</p>

w0051977
<p>"Latest" is a special tag, it means that Docker always check if the downloaded image is the latest available searching the registry. 
Retag your image with other tag than latest, like this :</p>

<blockquote>
  <p>docker tag iansimage:latest iansimage:v1</p>
</blockquote>

<p>Then change your Yaml and use iansimage:v1<br>
That solve your problem.</p>
