diff --git a/README.md b/README.md index 3460929..42ab31c 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ Kubernetes is an open‑source platform that automates the deployment, scaling, - [Manifest - StringData](#manifest---stringdata) - [Inline with heredoc and environment variables](#inline-with-heredoc-and-environment-variables) - [substr](#substr) + - [using as env](#using-as-env) - [mounting](#mounting) - [annotations](#annotations) - [nodes](#nodes) @@ -684,10 +685,24 @@ envsubst < ./secret.yaml | kubectl apply -f - ``` +### using as env + +``` yaml +containers: + image: myimage + env: + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: my-secret + key: PASSWORD +``` + ### mounting ``` yaml - +containers: + - name: test volumeMounts: - name: secret-name mountPath: /secret