From 259a929f04b6699bd55a6a892b9acf848a5c5997 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Feb 2022 17:56:22 +0100 Subject: [PATCH] Add alpine pod w/ secret --- generic/alpine-with-secret.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 generic/alpine-with-secret.yaml diff --git a/generic/alpine-with-secret.yaml b/generic/alpine-with-secret.yaml new file mode 100644 index 0000000..70fc925 --- /dev/null +++ b/generic/alpine-with-secret.yaml @@ -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