From dccbc5f3cd17175a231013a0b6ff0c52cc9232f1 Mon Sep 17 00:00:00 2001 From: Max Belsky Date: Thu, 22 Oct 2020 16:42:36 +0300 Subject: [PATCH] Reduce steps count to list the env vars --- .../define-environment-variable-container.md | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/content/en/docs/tasks/inject-data-application/define-environment-variable-container.md b/content/en/docs/tasks/inject-data-application/define-environment-variable-container.md index cbc3c45260..e31b711ad7 100644 --- a/content/en/docs/tasks/inject-data-application/define-environment-variable-container.md +++ b/content/en/docs/tasks/inject-data-application/define-environment-variable-container.md @@ -47,17 +47,10 @@ Pod: envar-demo 1/1 Running 0 9s ``` -1. Get a shell to the container running in your Pod: +1. List the pod's container environment variables: ```shell - kubectl exec -it envar-demo -- /bin/bash - ``` - -1. In your shell, run the `printenv` command to list the environment variables. - - ```shell - # Run this in the shell inside the container - printenv + kubectl exec envar-demo -- printenv ``` The output is similar to this: @@ -71,8 +64,6 @@ Pod: DEMO_FAREWELL=Such a sweet sorrow ``` -1. To exit the shell, enter `exit`. - {{< note >}} The environment variables set using the `env` or `envFrom` field override any environment variables specified in the container image.