title: kubectl run from local docker image?
body: <p>How to refer to the local image that exists? </p>
  
  <pre><code>kubectl run u --rm -i --tty --image my_local_image -- bash
  </code></pre>
  
  <p>Results in <code>ImagePullBackOff</code> and <code>kubectl</code> is obviously trying to pull from a remote repository instead of local register.</p>
  
  <p>This <a href="https://stackoverflow.com/questions/43462384/kubectl-run-local-docker-image-imagepullbackoff-status">answer</a> is unhelpful, and the follow up refers to minikube and kubernetes. </p>
  
  <p>Some event logs</p>
  
  <pre><code>Events:
    Type     Reason                 Age               From                         Message
    ----     ------                 ----              ----                         -------
    Normal   Scheduled              1m                default-scheduler            Successfully assigned u-6988b9c446-zcp99 to docker-for-desktop
    Normal   SuccessfulMountVolume  1m                kubelet, docker-for-desktop  MountVolume.SetUp succeeded for volume "default-token-q2qm7"
    Normal   SandboxChanged         1m                kubelet, docker-for-desktop  Pod sandbox changed, it will be killed and re-created.
    Normal   Pulling                23s (x3 over 1m)  kubelet, docker-for-desktop  pulling image "centos_postgres"
    Warning  Failed                 22s (x3 over 1m)  kubelet, docker-for-desktop  Failed to pull image "centos_postgres": rpc error: code = Unknown desc = Error response from daemon: pull access denied for centos_postgres, repository does not exist or may require 'docker login'
    Warning  Failed                 22s (x3 over 1m)  kubelet, docker-for-desktop  Error: ErrImagePull
    Normal   BackOff                9s (x5 over 1m)   kubelet, docker-for-desktop  Back-off pulling image "centos_postgres"
    Warning  Failed                 9s (x5 over 1m)   kubelet, docker-for-desktop  Error: ImagePullBackOff
  </code></pre>