@@ -155,21 +155,23 @@ the list. Similarly, avoid circular references.
155
155
<!--
156
156
## Using environment variables inside of your config
157
157
158
- Environment variables that you define in a Pod' s configuration can be used
159
- elsewhere in the configuration, for example in commands and arguments that
160
- you set for the Pod' s containers.
158
+ Environment variables that you define in a Pod' s configuration under
159
+ ` .spec.containers[ * ].env[ * ] ` can be used elsewhere in the configuration, for
160
+ example in commands and arguments that you set for the Pod' s containers.
161
161
In the example configuration below, the `GREETING`, `HONORIFIC`, and
162
162
`NAME` environment variables are set to `Warm greetings to`, `The Most
163
- Honorable`, and `Kubernetes`, respectively. Those environment variables
164
- are then used in the CLI arguments passed to the `env-print-demo`
165
- container.
163
+ Honorable`, and `Kubernetes`, respectively. The environment variable
164
+ `MESSAGE` combines the set of all these environment variables and then uses it
165
+ as a CLI argument passed to the `env-print-demo` container.
166
166
-->
167
167
## 在配置中使用环境变量 {#using-env-var-inside-of-your-config}
168
168
169
- 你在 Pod 的配置中定义的环境变量可以在配置的其他地方使用,
170
- 例如可用在为 Pod 的容器设置的命令和参数中。
169
+ 你在 Pod 的配置中定义的、位于 `.spec.containers[*].env[*]` 下的环境变量
170
+ 可以在配置的其他地方使用, 例如可用在为 Pod 的容器设置的命令和参数中。
171
171
在下面的示例配置中,环境变量 `GREETING`、`HONORIFIC` 和 `NAME` 分别设置为 `Warm greetings to`、
172
- `The Most Honorable` 和 `Kubernetes`。然后这些环境变量在传递给容器 `env-print-demo` 的 CLI 参数中使用。
172
+ `The Most Honorable` 和 `Kubernetes`。
173
+ 环境变量 `MESSAGE` 将所有这些环境变量的集合组合起来,
174
+ 然后再传递给容器 `env-print-demo` 的 CLI 参数中使用。
173
175
174
176
```yaml
175
177
apiVersion: v1
0 commit comments