<p>Trying to create a deployment from an image          </p>

<p><code>kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.10</code></p>

<p>and then do <code>kubectl get pods</code> and check the logs of hello-minikube pod using     </p>

<p><code>kubectl pod describe &lt;pod-name&gt;</code> throws following error </p>

<pre><code>  Type     Reason     Age                From               Message
  ----     ------     ----               ----               -------
  Normal   Scheduled  &lt;unknown&gt;          default-scheduler  Successfully assigned default/hello-minikube-797f975945-dmq26 to minikube
  Warning  Failed     42s                kubelet, minikube  Failed to pull image "k8s.gcr.io/echoserver:1.10": rpc error: code = Unknown desc = Error response from daemon: Get https://k8s.gcr.io/v2/: dial tcp: lookup k8s.gcr.io on 192.168.64.1:53: read udp 192.168.64.3:56747-&gt;192.168.64.1:53: read: connection refused
  Warning  Failed     27s                kubelet, minikube  Failed to pull image "k8s.gcr.io/echoserver:1.10": rpc error: code = Unknown desc = Error response from daemon: Get https://k8s.gcr.io/v2/: dial tcp: lookup k8s.gcr.io on 192.168.64.1:53: read udp 192.168.64.3:48279-&gt;192.168.64.1:53: read: connection refused
  Normal   BackOff    16s (x2 over 42s)  kubelet, minikube  Back-off pulling image "k8s.gcr.io/echoserver:1.10"
  Warning  Failed     16s (x2 over 42s)  kubelet, minikube  Error: ImagePullBackOff
  Normal   Pulling    4s (x3 over 42s)   kubelet, minikube  Pulling image "k8s.gcr.io/echoserver:1.10"
  Warning  Failed     4s (x3 over 42s)   kubelet, minikube  Error: ErrImagePull
  Warning  Failed     4s                 kubelet, minikube  Failed to pull image "k8s.gcr.io/echoserver:1.10": rpc error: code = Unknown desc = Error response from daemon: Get https://k8s.gcr.io/v2/: dial tcp: lookup k8s.gcr.io on 192.168.64.1:53: read udp 192.168.64.3:50616-&gt;192.168.64.1:53: read: connection refused
</code></pre>

Shivani Singhal
<p>This error can be solved using :</p>

<ol>
<li><p>Check whether any docker machine is running or not by <code>docker-machine ls</code></p></li>
<li><p>If no machine exist, then create one using <code>docker-machine create &lt;machine-name&gt;</code></p></li>
<li><p>Then get this machine IP using <code>docker-machine ip &lt;machine-name&gt;</code></p></li>
<li><p>Then first delete any existing minikube cluster using <code>minikube delete</code> and start again using <code>minikube start --vm-driver="virtualbox" --insecure-registry="docker-machine IP":80</code> </p></li>
<li><p>Then run <code>kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.10</code> and check the logs, it will show image pulled successfully.</p></li>
</ol>
