File tree Expand file tree Collapse file tree 1 file changed +3
-17
lines changed
content/zh/docs/tasks/inject-data-application Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change 76
76
` ` `
77
77
78
78
< ! --
79
- 1. Get a shell to the container running in your Pod :
79
+ 1. List the Pod ' s container environment variables :
80
80
-->
81
- 1. 进入该 Pod 下的容器并打开一个命令终端 :
81
+ 1. 列出 Pod 容器的环境变量 :
82
82
83
83
```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
94
85
```
95
86
96
87
<!--
107
98
DEMO_FAREWELL=Such a sweet sorrow
108
99
```
109
100
110
- < ! --
111
- 1. To exit the shell, enter ` exit` .
112
- -->
113
- 1. 通过键入 ` exit` 退出命令终端。
114
-
115
101
<!--
116
102
{{< note >}}
117
103
The environment variables set using the `env` or `envFrom` field
You can’t perform that action at this time.
0 commit comments