Add alpine pod w/ secret
This commit is contained in:
parent
e68c4451f0
commit
259a929f04
1 changed files with 24 additions and 0 deletions
24
generic/alpine-with-secret.yaml
Normal file
24
generic/alpine-with-secret.yaml
Normal file
|
@ -0,0 +1,24 @@
|
|||
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
|
Loading…
Reference in a new issue