Reduce steps count to list the env vars
This commit is contained in:
+2
-11
@@ -47,17 +47,10 @@ Pod:
|
|||||||
envar-demo 1/1 Running 0 9s
|
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
|
```shell
|
||||||
kubectl exec -it envar-demo -- /bin/bash
|
kubectl exec envar-demo -- printenv
|
||||||
```
|
|
||||||
|
|
||||||
1. In your shell, run the `printenv` command to list the environment variables.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# Run this in the shell inside the container
|
|
||||||
printenv
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The output is similar to this:
|
The output is similar to this:
|
||||||
@@ -71,8 +64,6 @@ Pod:
|
|||||||
DEMO_FAREWELL=Such a sweet sorrow
|
DEMO_FAREWELL=Such a sweet sorrow
|
||||||
```
|
```
|
||||||
|
|
||||||
1. To exit the shell, enter `exit`.
|
|
||||||
|
|
||||||
{{< note >}}
|
{{< note >}}
|
||||||
The environment variables set using the `env` or `envFrom` field
|
The environment variables set using the `env` or `envFrom` field
|
||||||
override any environment variables specified in the container image.
|
override any environment variables specified in the container image.
|
||||||
|
|||||||
Reference in New Issue
Block a user