title: Kubectl powershell create secret 'error: exactly one NAME is required, got 5'
body: <p>I think this is related to powershell issue as it has worked on my mac (bash script).</p>
  <p>Here's the one working in bash:</p>
  <pre><code>kubectl create secret docker-registry gcr-json-key \
          --docker-server=asia.gcr.io \
          --docker-username=_json_key \
          --docker-password=&quot;$(cat ./deploy/service-account.json)&quot; \
          --docker-email=email@company.com.au
  </code></pre>
  <p>Here's one in powershell:</p>
  <pre><code>$key=$(Get-Content ./deploy/service-account.json)
  
  kubectl create secret docker-registry 'gcr-json-key' `
          --docker-server='asia.gcr.io' `
          --docker-username='_json_key' `
          --docker-password=$key `
          --docker-email='email@company.com.au'
  </code></pre>
  <p>What could be wrong? is it because the quote is escaped in powershell when reading json file? I also realised that the <code>kubectl</code> script started giving <code>error: exactly one NAME is required, got 5</code> when i included <code>--docker-password</code> with json content.</p>
  <p>I tried a couple of things that didn't work as well such as putting flags to variable and tried escaping the quote in the json (assuming if that's the issue):</p>
  <pre><code>$param=&quot;--docker-server='asia.gcr.io' `
  --docker-username='_json_key' `
  --docker-password='$key' `
  --docker-email='email@company.com.au'&quot;
  
  kubectl create secret docker-registry 'gcr-json-key' $param
  </code></pre>