From dffde5d9941eaa431eeffb5c3b94332527e08b39 Mon Sep 17 00:00:00 2001 From: "xin.li" Date: Sun, 10 Sep 2023 12:32:07 +0800 Subject: [PATCH] [zh-cn]sync system-metrics logging device-plugins ingress network-policies Signed-off-by: xin.li --- .../cluster-administration/logging.md | 10 +++---- .../cluster-administration/system-metrics.md | 29 ------------------- .../compute-storage-net/device-plugins.md | 25 +++++----------- .../concepts/services-networking/ingress.md | 21 +++++++------- .../services-networking/network-policies.md | 22 +++++--------- 5 files changed, 31 insertions(+), 76 deletions(-) diff --git a/content/zh-cn/docs/concepts/cluster-administration/logging.md b/content/zh-cn/docs/concepts/cluster-administration/logging.md index 32b12a257b..f0258410d9 100644 --- a/content/zh-cn/docs/concepts/cluster-administration/logging.md +++ b/content/zh-cn/docs/concepts/cluster-administration/logging.md @@ -69,7 +69,7 @@ Kubernetes 从正在运行的 Pod 中捕捉每个容器的日志。 此示例使用带有一个容器的 `Pod` 的清单,该容器每秒将文本写入标准输出一次。 -{{% code file="debug/counter-pod.yaml" %}} +{{% code_sample file="debug/counter-pod.yaml" %}} 下面是运行两个边车容器的 Pod 的清单: -{{% code file="admin/logging/two-files-counter-pod-streaming-sidecar.yaml" %}} +{{% code_sample file="admin/logging/two-files-counter-pod-streaming-sidecar.yaml" %}} -## 禁用加速器指标 {#disable-accelerator-metrics} - -kubelet 通过 cAdvisor 收集加速器指标。为了收集这些指标,对于 NVIDIA GPU 之类的加速器, -kubelet 在驱动程序上保持打开状态。这意味着为了执行基础结构更改(例如更新驱动程序), -集群管理员需要停止 kubelet 代理。 - -现在,收集加速器指标的责任属于供应商,而不是 kubelet。供应商必须提供一个收集指标的容器, -并将其公开给指标服务(例如 Prometheus)。 - -[`DisableAcceleratorUsageMetrics` 特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/) -禁止由 kubelet 收集的指标。 -关于[何时会在默认情况下启用此功能也有一定规划](https://github.com/kubernetes/enhancements/tree/411e51027db842355bd489691af897afc1a41a5e/keps/sig-node/1867-disable-accelerator-usage-metrics#graduation-criteria)。 - -Kubernetes 提供了一个 -[设备插件框架](https://git.k8s.io/design-proposals-archive/resource-management/device-plugin.md), -你可以用它来将系统硬件资源发布到 {{< glossary_tooltip term_id="kubelet" >}}。 +Kubernetes 提供了一个设备插件框架,你可以用它来将系统硬件资源发布到 +{{< glossary_tooltip term_id="kubelet" >}}。 供应商可以实现设备插件,由你手动部署或作为 {{< glossary_tooltip term_id="daemonset" >}} 来部署,而不必定制 Kubernetes 本身的代码。目标设备包括 GPU、高性能 NIC、FPGA、 @@ -454,7 +452,7 @@ this feature `kubelet` must be started with the following flags: 要启用此特性,必须使用以下标志启动 `kubelet`: ``` ---feature-gates=DynamicResourceAllocation=true,KubeletPodResourcesDynamiceResources=true +--feature-gates=DynamicResourceAllocation=true,KubeletPodResourcesDynamicResources=true ``` -对 “PodResourcesLister 服务”的支持要求启用 `KubeletPodResources` -[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)。 -从 Kubernetes 1.15 开始默认启用,自从 Kubernetes 1.20 开始为 v1。 - @@ -774,7 +763,7 @@ ensure your kubelet services are started with the following flags: 要启用此特性,你必须确保使用以下标志启动 kubelet 服务: ``` ---feature-gates=KubeletPodResourcesGet=true,DynamicResourceAllocation=true,KubeletPodResourcesDynamiceResources=true +--feature-gates=KubeletPodResourcesGet=true,DynamicResourceAllocation=true,KubeletPodResourcesDynamicResources=true ``` 这将需要一个如下所示的 Ingress: -{{% code file="service/networking/simple-fanout-example.yaml" %}} +{{% code_sample file="service/networking/simple-fanout-example.yaml" %}} 如果你想允许一个名字空间中所有 Pod 的所有入站连接,你可以创建一个明确允许的策略。 -{{< codenew file="service/networking/network-policy-allow-all-ingress.yaml" >}} +{{< code_sample file="service/networking/network-policy-allow-all-ingress.yaml" >}} ## 基于名字指向某名字空间 {#targeting-a-namespace-by-its-name} -{{< feature-state for_k8s_version="1.22" state="stable" >}} - -只要 `NamespaceDefaultLabelName` -[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)被启用, Kubernetes 控制面会在所有名字空间上设置一个不可变更的标签 `kubernetes.io/metadata.name`。该标签的值是名字空间的名称。