Merge pull request #24802 from huchengze/patch-40

Update define-environment-variable-container.md
This commit is contained in:
Kubernetes Prow Robot 2020-10-31 06:10:51 -07:00 committed by GitHub
commit 1082d1279d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 17 deletions

View File

@ -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