You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If your environment variable definitions in your Pod specification are
1082
-
considered to be invalid environment variable names, those keys aren't made
1083
-
available to your container. The Pod is allowed to start.
1084
-
-->
1085
-
#### 非法环境变量 {#restriction-env-from-invalid}
1086
-
1087
-
如果 Pod 规约中环境变量定义会被视为非法的环境变量名,这些主键将在你的容器中不可用。
1088
-
Pod 仍然可以启动。
1089
-
1090
-
<!--
1091
-
Kubernetes adds an Event with the reason set to `InvalidVariableNames` and a
1092
-
message that lists the skipped invalid keys. The following example shows a Pod that refers to a Secret named `mysecret`, where `mysecret` contains 2 invalid keys: `1badkey` and `2alsobad`.
It's important to note that the range of characters allowed for environment variable
1080
+
names in pods is [restricted](/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config).
1081
+
If any keys do not meet the rules, those keys are not made available to your container, though
1082
+
the Pod is allowed to start.
1104
1083
-->
1105
-
输出类似于:
1106
-
1107
-
```
1108
-
LASTSEEN FIRSTSEEN COUNT NAME KIND SUBOBJECT TYPE REASON
1109
-
0s 0s 1 dapi-test-pod Pod Warning InvalidEnvironmentVariableNames kubelet, 127.0.0.1 Keys [1badkey, 2alsobad] from the EnvFrom secret default/mysecret were skipped since they are considered invalid environment variable names.
0 commit comments