Skip to content

Instantly share code, notes, and snippets.

@anjanashankar9
Created March 21, 2023 14:33
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/c0e2c8de0101ade476d346fac1d9ac51 to your computer and use it in GitHub Desktop.
Save anjanashankar9/c0e2c8de0101ade476d346fac1d9ac51 to your computer and use it in GitHub Desktop.
Using a secret as a file from a Pod
apiVersion: v1
kind: Pod
metadata:
name: example-secret
spec:
containers:
- name: example-container
image: nginx
volumeMounts:
# name must match the volume name below
- name: secret-volume
mountPath: /etc/secret-volume
readOnly: true
# The secret data is exposed to Containers in the Pod through a Volume.
volumes:
- name: secret-volume
secret:
secretName: test-secret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment