Merge pull request #45934 from asa3311/sync-zh-114
[zh]sync configure-pod-configmap define-environment-variable-container horizontal-pod-autoscalepull/45943/head
commit
40fa7ba10e
|
@ -1511,6 +1511,9 @@ or move it into the trash can / deleted files location.
|
|||
<!--
|
||||
* Follow a real world example of
|
||||
[Configuring Redis using a ConfigMap](/docs/tutorials/configuration/configure-redis-using-configmap/).
|
||||
* Follow an example of [Updating configuration via a ConfigMap](/docs/tutorials/configuration/updating-configuration-via-a-configmap/).
|
||||
-->
|
||||
* 浏览[使用 ConfigMap 配置 Redis](/zh-cn/docs/tutorials/configuration/configure-redis-using-configmap/)
|
||||
真实示例。
|
||||
* 参照一个[通过 ConfigMap 更新配置](/zh-cn/docs/tutorials/configuration/updating-configuration-via-a-configmap/)
|
||||
的示例.
|
||||
|
|
|
@ -173,6 +173,16 @@ as a CLI argument passed to the `env-print-demo` container.
|
|||
环境变量 `MESSAGE` 将所有这些环境变量的集合组合起来,
|
||||
然后再传递给容器 `env-print-demo` 的 CLI 参数中使用。
|
||||
|
||||
<!--
|
||||
Environment variable names consist of letters, numbers, underscores,
|
||||
dots, or hyphens, but the first character cannot be a digit.
|
||||
If the `RelaxedEnvironmentVariableValidation` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is enabled,
|
||||
all [printable ASCII characters](https://www.ascii-code.com/characters/printable-characters) except "=" may be used for environment variable names.
|
||||
-->
|
||||
环境变量名由字母、数字、下划线、点或连字符组成,但第一个字符不能是数字。
|
||||
如果启用了 `RelaxedEnvironmentVariableValidation` 特性门控,
|
||||
则所有可打印的 ASCII 字符("=" 除外)都可以用于环境变量名。
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
|
|
|
@ -497,19 +497,19 @@ pod usage is still within acceptable limits.
|
|||
-->
|
||||
### 容器资源指标 {#container-resource-metrics}
|
||||
|
||||
{{< feature-state for_k8s_version="v1.27" state="beta" >}}
|
||||
{{< feature-state feature_gate_name="HPAContainerMetrics" >}}
|
||||
|
||||
<!--
|
||||
The HorizontalPodAutoscaler API also supports a container metric source where the HPA can track the
|
||||
resource usage of individual containers across a set of Pods, in order to scale the target resource.
|
||||
This lets you configure scaling thresholds for the containers that matter most in a particular Pod.
|
||||
For example, if you have a web application and a logging sidecar, you can scale based on the resource
|
||||
For example, if you have a web application and a sidecar container that provides logging, you can scale based on the resource
|
||||
use of the web application, ignoring the sidecar container and its resource use.
|
||||
-->
|
||||
HorizontalPodAutoscaler API 也支持容器指标源,这时 HPA 可以跟踪记录一组 Pod
|
||||
中各个容器的资源用量,进而触发扩缩目标对象的操作。
|
||||
容器资源指标的支持使得你可以为特定 Pod 中最重要的容器配置规模扩缩阈值。
|
||||
例如,如果你有一个 Web 应用和一个执行日志操作的边车容器,你可以基于 Web
|
||||
例如,如果你有一个 Web 应用和一个提供记录日志功能的边车容器,你可以基于 Web
|
||||
应用的资源用量来执行扩缩,忽略边车容器的存在及其资源用量。
|
||||
|
||||
<!--
|
||||
|
|
Loading…
Reference in New Issue