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