<p>I have the following image created by a Dockerfile:</p>

<pre><code>REPOSITORY   TAG      IMAGE ID       CREATED       SIZE 
ruby/lab     latest   f1903b1508cb   2 hours ago   729.6 MB
</code></pre>

<p>And I have my following YAML file:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: ruby-deployment
spec:
  replicas: 2
  template:
    metadata:
      labels:
        app: ruby
    spec:
      containers:
      - name: ruby-app
        image: ruby/lab
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 4567
</code></pre>

<p>When I create the deployment I got the following info in the pods:</p>

<pre><code>ruby-deployment-3830038651-sa4ii   0/1       ImagePullBackOff   0          7m
ruby-deployment-3830038651-u1tvc   0/1       ImagePullBackOff   0          7m
</code></pre>

<p>And the error <code>Failed to pull image "ruby/lab:latest": Error: image ruby/lab not found</code> from below:</p>

<pre><code> 8m            2m              6       {kubelet minikube}      spec.containers{ruby}   Normal          Pulling         pulling image "ruby/lab:latest"
 8m            2m              6       {kubelet minikube}      spec.containers{ruby}   Warning         Failed          Failed to pull image "ruby/lab:latest": Error: image ruby/lab not found
 8m            2m              6       {kubelet minikube}                              Warning         FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "ruby" with ErrImagePull: "Error: image ruby/lab not found"
</code></pre>

<p>Is really necessary to have registry in docker for this? I just want to make test locally and pass my code/repo to a friend for testing purposes</p>

<p>Thanks</p>

<p>You can point your docker client to the VM's docker daemon by running </p>

<pre><code>eval $(minikube docker-env)
</code></pre>

<p>Then you can build your image normally and create your kubernetes resources normally using kubectl.  Make sure that you have </p>

<pre><code>imagePullPolicy: IfNotPresent
</code></pre>

<p>in your YAML or JSON specs.  </p>

<p>Additionally, there is a flag to pass in insecure registries to the minikube VM.  However, this must be specified the first time you create the machine.</p>

<pre><code>minikube start --insecure-registry
</code></pre>

<p>You may also want to read this when using a private registry
<a href="http://kubernetes.io/docs/user-guide/images/" rel="noreferrer">http://kubernetes.io/docs/user-guide/images/</a></p>
