Difference between revisions of "SecretKeyRef"
Jump to navigation
Jump to search
Line 30: | Line 30: | ||
+ | == See also == | ||
+ | * {{K8s secrets}} | ||
− | + | [[Category:K8s]] |
Revision as of 19:03, 20 September 2022
Official example
apiVersion: v1 kind: Pod metadata: name: secret-env-pod spec: containers: - name: mycontainer image: redis env: - name: SECRET_USERNAME valueFrom: secretKeyRef: name: mysecret key: username optional: false # same as default; "mysecret" must exist # and include a key named "username" - name: SECRET_PASSWORD valueFrom: secretKeyRef: name: mysecret key: password optional: false # same as default; "mysecret" must exist # and include a key named "password" restartPolicy: Never
See also
- Kubernetes secrets:
kubectl [ get | create | describe | delete | secret ] secrets
,secret.yml, kind: Secret, secretKeyRef, default-token, imagePullSecrets:, kubernetes.io/dockerconfigjson
Advertising: