Skip to content

Commit 1082d12

Browse files
authored
Merge pull request #24802 from huchengze/patch-40
Update define-environment-variable-container.md
2 parents e06d1a6 + 379b690 commit 1082d12

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

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

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,12 @@ Pod:
7676
```
7777

7878
<!--
79-
1. Get a shell to the container running in your Pod:
79+
1. List the Pod's container environment variables:
8080
-->
81-
1. 进入该 Pod 下的容器并打开一个命令终端
81+
1. 列出 Pod 容器的环境变量
8282
8383
```shell
84-
kubectl exec -it envar-demo -- /bin/bash
85-
```
86-
87-
<!--
88-
1. In your shell, run the `printenv` command to list the environment variables.
89-
-->
90-
1. 在命令终端中通过执行 `printenv` 打印出环境变量。
91-
92-
```shell
93-
root@envar-demo:/# printenv
84+
kubectl exec envar-demo -- printenv
9485
```
9586
9687
<!--
@@ -107,11 +98,6 @@ Pod:
10798
DEMO_FAREWELL=Such a sweet sorrow
10899
```
109100
110-
<!--
111-
1. To exit the shell, enter `exit`.
112-
-->
113-
1. 通过键入 `exit` 退出命令终端。
114-
115101
<!--
116102
{{< note >}}
117103
The environment variables set using the `env` or `envFrom` field

0 commit comments

Comments
 (0)