Update define-environment-variable-container.md

This commit is contained in:
huccshen
2020-10-30 17:15:42 +08:00
committed by GitHub
parent 564e9ae263
commit 379b6907f3
@@ -76,21 +76,12 @@ Pod:
```
<!--
1. Get a shell to the container running in your Pod:
1. List the Pod's container environment variables:
-->
1. 进入该 Pod 下的容器并打开一个命令终端
1. 列出 Pod 容器的环境变量
```shell
kubectl exec -it envar-demo -- /bin/bash
```
<!--
1. In your shell, run the `printenv` command to list the environment variables.
-->
1. 在命令终端中通过执行 `printenv` 打印出环境变量。
```shell
root@envar-demo:/# printenv
kubectl exec envar-demo -- printenv
```
<!--
@@ -107,11 +98,6 @@ Pod:
DEMO_FAREWELL=Such a sweet sorrow
```
<!--
1. To exit the shell, enter `exit`.
-->
1. 通过键入 `exit` 退出命令终端。
<!--
{{< note >}}
The environment variables set using the `env` or `envFrom` field