Skip to content

Commit dccbc5f

Browse files
authored
Reduce steps count to list the env vars
1 parent b2c714b commit dccbc5f

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

content/en/docs/tasks/inject-data-application/define-environment-variable-container.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,10 @@ Pod:
4747
envar-demo 1/1 Running 0 9s
4848
```
4949

50-
1. Get a shell to the container running in your Pod:
50+
1. List the pod's container environment variables:
5151
5252
```shell
53-
kubectl exec -it envar-demo -- /bin/bash
54-
```
55-
56-
1. In your shell, run the `printenv` command to list the environment variables.
57-
58-
```shell
59-
# Run this in the shell inside the container
60-
printenv
53+
kubectl exec envar-demo -- printenv
6154
```
6255
6356
The output is similar to this:
@@ -71,8 +64,6 @@ Pod:
7164
DEMO_FAREWELL=Such a sweet sorrow
7265
```
7366
74-
1. To exit the shell, enter `exit`.
75-
7667
{{< note >}}
7768
The environment variables set using the `env` or `envFrom` field
7869
override any environment variables specified in the container image.

0 commit comments

Comments
 (0)