title: Creating ssh secrets key file in kubernetes
body: <p>If i create a secret from an id_rsa file using kubectl as:</p>
  
  <pre><code>kubectl create secret generic hcom-secret --from-file=ssh-privatekey=./.ssh/id_rsa
  </code></pre>
  
  <p>And then mount the secret into the container</p>
  
  <pre><code>"volumeMounts": [
          {"name": "cfg", "readOnly": false, "mountPath": "/home/hcom/.ssh"}
        ]
  
  "volumes": [
        {"name": "cfg", "secret": { "secretName": "hcom-ssh" }}
      ],
  </code></pre>
  
  <p>The resultant file is not id_rsa but ssh-privatekey and the permits that are on it are not 600 which ssh expects</p>
  
  <p>Is this a correct approach, or can anyone please detail how this should be done?</p>