Skip to content

Instantly share code, notes, and snippets.

@anjanashankar9
Created March 21, 2023 14:35
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 anjanashankar9/1166fd099117f953ef7f157752295d12 to your computer and use it in GitHub Desktop.
Save anjanashankar9/1166fd099117f953ef7f157752295d12 to your computer and use it in GitHub Desktop.
Using a secret as an environment variable
apiVersion: v1
kind: Pod
metadata:
name: example-secret
spec:
containers:
- name: example-container
image: nginx
env:
- name: SECRET
valueFrom:
secretKeyRef:
name: test-secret
key: test-secret-key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment