<p>I load an image (.tar) into local docker repository and then Kubernetes pulls that Image into a container. After the application is up and running I want to remove that image from local docker repository, is that right way or Kubernetes still needs that image inside docker local repository?
I have tested when deleting that image, my Application still works, but if I want to scale up or scale down, I got a problem because the image is missing.</p>

<p>I presume, if the Pod goes down, Kubernetes will seek for Image again in docker repository?</p>

<p>Is there any way to cache that Image inside Kubernetes, so no need to pull again from docker repository?</p>

<p>The reason why I want to delete these images right after Application run on Kubernetes is security, I don't want to leave my images inside docker repository so a user can't extract that image and export it somewhere...</p>

Dino
<blockquote>
  <p>I presume, if the Pod goes down, Kubernetes will seek for Image again in docker repository?</p>
</blockquote>

<p>Yes.</p>

<blockquote>
  <p>Is there any way to cache that Image inside Kubernetes, so no need to pull again from docker repository?</p>
</blockquote>

<p>When you pull an image it's cached locally by docker or your runtime manager.</p>

<blockquote>
  <p>The reason why I want to delete these images right after Application run on Kubernetes is security, I don't want to leave my images inside docker repository so a user can't extract that image and export it somewhere...</p>
</blockquote>

<p>If you are concerned about security you shouldn't put sensitive information in the image (passwords, credentials, keys). That's why there are <a href="https://kubernetes.io/docs/concepts/configuration/secret/" rel="nofollow noreferrer">Kubernetes Secrets</a> or tools like <a href="https://www.vaultproject.io/" rel="nofollow noreferrer">Hashicorp Vault</a>.</p>

<p>If you are concerned about keeping intellectual property private you should consider using a private container image repository or private <a href="https://github.com/docker/distribution" rel="nofollow noreferrer">Docker registry</a></p>
