<p>I've successfully <a href="https://cloud.google.com/container-registry/#pushing_to_the_registry" rel="nofollow">pushed my Docker container image to gcr.io</a> with the following command:</p>

<p><code>$ gcloud docker push gcr.io/project-id-123456/my-image</code></p>

<p>But when I try to <a href="https://cloud.google.com/container-engine/docs/pods/single-container#creating_a_pod" rel="nofollow">create a new pod</a> I get the following error:</p>

<pre><code>$ kubectl run my-image --image=gcr.io/project-id-123456/my-image
CONTROLLER  CONTAINER(S)  IMAGE(S)                           SELECTOR      REPLICAS
my-image    my-image      gcr.io/project-id-123456/my-image  run=my-image  1

$ kubectl get pods
NAME            READY  STATUS                                                                                                   RESTARTS   AGE
my-image-of9x7  0/1    Error pulling image (latest) from gcr.io/project-id-123456/my-image, Untar exit status 1 unexpected EOF  0          5m
</code></pre>

<p>It doesn't pull on my local as well:</p>

<pre><code>$ docker rmi -f $(docker images -q) # Clear local image cache
$ gcloud docker pull gcr.io/project-id-123456/my-image:latest
…
Error pulling image (latest) from gcr.io/project-id-123456/my-image, Untar re-exec error: exit status 1: output: unexpected EOF
</code></pre>

<p>Can someone please suggest me how to fix this?</p>

<p>Ok, after digging around in the Docker code base, I think I have found some similar reports of what you are seeing.</p>

<p>The way this error is displayed changed in 1.7, but this thread seems related:
   <a href="https://github.com/docker/docker/issues/14792" rel="nofollow">https://github.com/docker/docker/issues/14792</a></p>

<p>This turned me onto this fix, which landed in 1.8:
   <a href="https://github.com/docker/docker/pull/15040" rel="nofollow">https://github.com/docker/docker/pull/15040</a></p>

<p>In particular, see this comment:
   <a href="https://github.com/docker/docker/pull/15040#issuecomment-125661037" rel="nofollow">https://github.com/docker/docker/pull/15040#issuecomment-125661037</a></p>

<p>The comment seems to indicate that this is only a problem for v1 layers, so our Beta support for v2 may work around this issue.</p>

<p>You can push to our v2 beta via:
<code>
   gcloud docker --server=beta.gcr.io push beta.gcr.io/project-id-123456/...
</code></p>

<p>You can then simply change the reference in your Pod to "beta.gcr.io/..."  and it will pull via v2.</p>
