<p>I deployed an image to  Kubernetes, but it never becomes ready, even after hours.  </p>

<pre><code>$ kubectl get pods

NAME                            READY     STATUS             RESTARTS   AGE
myapp-b8dd974db-9jbsl    0/1       ImagePullBackOff   0          21m
</code></pre>

<p>All this happens with the Quickstart <a href="https://cloud.google.com/kubernetes-engine/docs/quickstart" rel="nofollow noreferrer">Hello app</a>, as well as my own Docker image.</p>

<p>Attempts to attach fail.</p>

<pre><code>$ kubectl attach -it  myapp-b8dd974db-9jbs

Unable to use a TTY - container myapp did not allocate one
If you don't see a command prompt, try pressing enter.
error: unable to upgrade connection: container 
   myapp not found in pod myapp-b8dd974db-9jbsl_default
</code></pre>

<p>Attempts to access it over HTTP fail.</p>

<p>In Stackdriver Logging I see messages like </p>

<pre><code>skipping: failed to "StartContainer" for "myapp"
with ImagePullBackOff: "Back-off pulling image 
\"gcr.io/myproject/myapp-image:1.0\""
</code></pre>

<p>and <code>No such image</code></p>

<p>Yet I did deploy these images and the Cloud Console shows that the pods are "green."</p>

<p>And <code>kubectl</code> seems to tell me that the cluster is OK.</p>

<pre><code>$ kubectl get service myapp
NAME           TYPE           CLUSTER-IP     EXTERNAL-IP      PORT(S)          AGE
myapp   LoadBalancer   10.43.248.78   35.193.107.141   8222:31840/TCP   29m
</code></pre>

<p>How can I diagnose this?</p>

<p>You can use <code>kubectl describe myapp-b8dd974db-9jbsl</code> to get more information on your pod.</p>

<p>But from the status message 'ImagePullBackOff' it is probably trying to download the docker image and failing.</p>

<p>This might because of several reasons, you will obtain more information with the <code>kubectl describe</code> but it's probably that you don't have permissions to that docker repository or the image/image:tag does not exist.</p>
