title: Best way to update Kubernetes secret from command line
body: <p>The kubernetes dashboard allows one to see secrets in plain text (<em>not</em> base64 encoded) and make an easy change to any key-value pair within a Secret. I cannot find a way to easily make a similar change on the command line.</p>
  
  <p>My best attempt has been to write a script which uses <code>kubectl get secret</code> to pull all of the data in Json format, grab each key-value pair, base64 decode the values, update the one I actually want, then feed them all back in to <code>kubectl apply</code>. After running into multiple issues I figured there is probably a <code>kubectl</code> option that I'm overlooking which will allow me to update just one key-value pair in a given Secret.</p>
  
  <p>How can I do this?</p>