Created
March 21, 2023 14:33
-
-
Save anjanashankar9/c0e2c8de0101ade476d346fac1d9ac51 to your computer and use it in GitHub Desktop.
Using a secret as a file from a Pod
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: 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