24 lines
462 B
YAML
24 lines
462 B
YAML
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: alpine-secret
|
|
spec:
|
|
containers:
|
|
- name: alpine
|
|
image: alpine:3.15
|
|
args:
|
|
- sleep
|
|
- "1000000"
|
|
volumeMounts:
|
|
- name: sshkey
|
|
mountPath: "/root/.ssh/id_rsa.pub"
|
|
subPath: "ssh-publickey"
|
|
- name: sshkey
|
|
mountPath: "/root/.ssh/id_rsa"
|
|
subPath: "ssh-privatekey"
|
|
|
|
volumes:
|
|
- name: sshkey
|
|
secret:
|
|
secretName: sshkey
|
|
defaultMode: 0400
|