SSH (and git+ssh) has very particular opinions about file permissions. In Kubernetes you can set secret file permissions, but not ownership: (see the "Secret files permissions" section) https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets
apiVersion: v1
kind: Pod
metadata:
name: security-context-demo