Skip to content

Instantly share code, notes, and snippets.

@innovia
Last active December 21, 2019 01:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save innovia/278adfa2f17d5dd9d4cedb38442ad019 to your computer and use it in GitHub Desktop.
Save innovia/278adfa2f17d5dd9d4cedb38442ad019 to your computer and use it in GitHub Desktop.
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: tester
namespace: default
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: test
spec:
replicas: 1
selector:
matchLabels:
app: hello-secrets
template:
metadata:
labels:
app: hello-secrets
annotations:
vault.security/enabled: "true"
vault.security/vault-addr: "https://vault.default.svc.cluster.local:8200"
vault.security/vault-role: "tester"
vault.security/vault-path: "secret/test/vault/auto/secret"
vault.security/vault-tls-secret-name: "vault-consul-ca"
spec:
serviceAccountName: tester
containers:
- name: alpine
image: alpine
command:
- "sh"
- "-c"
- "echo $AWS_SECRET_ACCESS_KEY && echo going to sleep... && sleep 10000"
env:
- name: AWS_SECRET_ACCESS_KEY
value: vault:AWS_SECRET_ACCESS_KEY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment