title: Create kubernetes docker-registry secret from yaml file?
body: <p>I can run this command to create a docker registry secret for a kubernetes cluster:</p>
  
  <pre><code>kubectl create secret docker-registry regsecret \
  --docker-server=docker.example.com \
  --docker-username=kube \
  --docker-password=PW_STRING \
  --docker-email=my@email.com \
  --namespace mynamespace 
  </code></pre>
  
  <p>I would like to create the same secret from a YAML file. Does anyone know how this can be set in a YAML file?</p>
  
  <p>I need this as a YAML file so that it can be used as a Helm template, which allows for a Helm install command such as this (simplified) one:</p>
  
  <pre><code>helm install ... --set docker.user=peter,docker.pw=foobar,docker.email=...
  </code></pre>