title: How to add a docker-registry secret for Google Cloud Platform on Windows (that is, in PowerShell, not Bash)?
body: <p>I'm using Windows, Docker for Windows with Kubernetes enabled and PowerShell (not Bash). This is just for local testing of my Docker images and Kubernetes set up. The problem I'm having is getting access to Google's Container Registry.</p>
  
  <p>I created the service account, hopefully with the right permissions but I'm not there yet. I've got the JSON file with the private key and other details. My problem is when I try to create the secret by running:</p>
  
  <pre><code>kubectl create secret docker-registry gcr-json-key --docker-server=eu.gcr.io --docker-username=_json_key --docker-password="$(cat json_credentials.json)" --docker-email=pupeno@example.com
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>error: exactly one NAME is required, got 5
  See 'kubectl create secret docker-registry -h' for help and examples.
  </code></pre>
  
  <p>My guess is that after <code>--docker-password="</code> I end up with line-feeds, quotes, etc. and that is causing the problem. Or is it something else? How am I suppose to do it? Does this work in Bash but not PowerShell? </p>