Difference between revisions of "Distribute Credentials Securely Using Secrets"
Jump to navigation
Jump to search
(Created page with " * https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/ {{K8s secrets}}") |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
| + | apiVersion: v1 | ||
| + | kind: Pod | ||
| + | metadata: | ||
| + | name: secret-test-pod | ||
| + | spec: | ||
| + | containers: | ||
| + | - name: test-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 | ||
| − | {{K8s secrets}} | + | |
| + | |||
| + | == See also == | ||
| + | * {{K8s secrets}} | ||
| + | |||
| + | [[Category:K8s]] | ||
Latest revision as of 11:03, 15 October 2024
apiVersion: v1
kind: Pod
metadata:
name: secret-test-pod
spec:
containers:
- name: test-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
See also[edit]
Advertising: