Reduce steps count to list the env vars

This commit is contained in:
Max Belsky
2020-10-22 16:42:36 +03:00
committed by GitHub
parent b2c714b279
commit dccbc5f3cd
@@ -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.