Created
December 26, 2019 12:59
-
-
Save alexei-led/6ae6d57ed08b26c64f534f87fc1872df to your computer and use it in GitHub Desktop.
Markdium-Kubernetes and Secrets Management in Cloud
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: printenv-job | |
spec: | |
template: | |
spec: | |
restartPolicy: Never | |
serviceAccountName: iam-secrets-manager-ro | |
initContainers: | |
- name: secrets-init | |
image: doitintl/secrets-init:v0.2.1 | |
command: | |
- sh | |
args: | |
- -c | |
- "cp /usr/local/bin/secrets-init /secrets-init/bin/" | |
volumeMounts: | |
- mountPath: /secrets-init/bin | |
name: secrets-init-volume | |
containers: | |
- image: alpine:3 | |
name: print-env | |
env: | |
- name: AWS_REGION | |
value: us-west-2 | |
- name: TOP_SECRET | |
value: arn:aws:secretsmanager:us-west-2:906364353610:secret:topsecret-Acdaq8 | |
command: | |
- /secrets-init/bin/secrets-init | |
args: | |
- sh | |
- -c | |
- 'echo $TOP_SECRET' | |
volumeMounts: | |
- mountPath: /secrets-init/bin | |
name: secrets-init-volume | |
volumes: | |
- name: secrets-init-volume | |
emptyDir: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment