title: Creating image pull secret for google container registry that doesn't expire?
body: <p>I'm trying to get Kubernetes to download images from a Google Container Registry from another project. According to the <a href="http://kubernetes.io/docs/user-guide/images/#specifying-imagepullsecrets-on-a-pod">docs</a> you should create an image pull secret using: </p>
  
  <pre><code>$ kubectl create secret docker-registry myregistrykey --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL
  </code></pre>
  
  <p>But I wonder what <code>DOCKER_USER</code> and <code>DOCKER_PASSWORD</code> I should use for authenticating with Google Container Registry? Looking at the <a href="https://cloud.google.com/container-registry/docs/auth">GCR docs</a> it says that the password is the access token that you can get by running:</p>
  
  <pre><code>$ gcloud auth print-access-token
  </code></pre>
  
  <p>This actually works... for a while. The problem seems to be that this access token expires after (what I believe to be) one hour. I need a password (or something) that doesn't expire when creating my image pull secret. Otherwise the Kubernetes cluster can't download the new images after an hour or so. What's the correct way to do this?</p>