<p>When my pods start, they fail with <code>Failed to pull image "gcr.io/myproject/backend:staging": rpc error: code = Unknown desc = Error response from daemon: pull access denied for gcr.io/myproject/backend, repository does not exist or may require 'docker login'</code></p>

<p>This is happening on <code>minikube</code>, despite the fact that (I believe) I have correctly created the service account in GCP, created a Secret based on the downloaded key in the namespace the pods are in, and patched the default service account, i.e.,</p>

<pre><code>kubectl --namespace=staging create secret docker-registry gcr-json-key --docker-server=https://gcr.io --docker-username=_json_key --docker-password="$(cat ~/Downloads/gcr-read-key.json)" --docker-email=me@email.com
kubectl --namespace=staging patch serviceaccount default -p '{"imagePullSecrets": [{"name": "gcr-json-key"}]}'
</code></pre>

<p>Examining the GCR images web view shows the repo and an image with the specified tags. </p>

<p>I've also tried adding the <code>imagePullSecrets</code> entry in the deploy file to no good effect. </p>

Ben
<p>You need to add to your service account a rol to access the storage on GCS, at the end the registry is on top of a bucket</p>
