Skip to content

Commit 411b1dd

Browse files
committed
[zh] Resync concepts section (15)
1 parent f112584 commit 411b1dd

File tree

3 files changed

+57
-9
lines changed

3 files changed

+57
-9
lines changed

content/zh/docs/concepts/cluster-administration/addons.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Add-ons 扩展了 Kubernetes 的功能。
2525
<!--
2626
## Networking and Network Policy
2727
28-
2928
* [ACI](https://www.github.com/noironetworks/aci-containers) provides integrated container networking and network security with Cisco ACI.
29+
* [Antrea](https://antrea.io/) operates at Layer 3/4 to provide networking and security services for Kubernetes, leveraging Open vSwitch as the networking data plane.
3030
* [Calico](https://docs.projectcalico.org/latest/getting-started/kubernetes/) is a secure L3 networking and network policy provider.
3131
* [Canal](https://github.com/tigera/canal/tree/master/k8s-install) unites Flannel and Calico, providing networking and network policy.
3232
* [Cilium](https://github.com/cilium/cilium) is a L3 network and network policy plugin that can enforce HTTP/API/L7 policies transparently. Both routing and overlay/encapsulation mode are supported.
@@ -46,6 +46,8 @@ Add-ons 扩展了 Kubernetes 的功能。
4646
## 网络和网络策略
4747

4848
* [ACI](https://www.github.com/noironetworks/aci-containers) 通过 Cisco ACI 提供集成的容器网络和安全网络。
49+
* [Antrea](https://antrea.io/) 在第 3/4 层执行操作,为 Kubernetes
50+
提供网络连接和安全服务。Antrea 利用 Open vSwitch 作为网络的数据面。
4951
* [Calico](https://docs.projectcalico.org/v3.11/getting-started/kubernetes/installation/calico)
5052
是一个安全的 L3 网络和网络策略驱动。
5153
* [Canal](https://github.com/tigera/canal/tree/master/k8s-install) 结合 Flannel 和 Calico,提供网络和网络策略。

content/zh/docs/concepts/cluster-administration/logging.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,16 @@ up logging for COS image on GCP in the corresponding
157157
脚本为
158158
[`configure-helper` 脚本](https://github.com/kubernetes/kubernetes/blob/{{< param "githubbranch" >}}/cluster/gce/gci/configure-helper.sh)。
159159

160+
<!--
161+
When using a **CRI container runtime**, the kubelet is responsible for rotating the logs and managing the logging directory structure. The kubelet
162+
sends this information to the CRI container runtime and the runtime writes the container logs to the given location. The two kubelet flags `container-log-max-size` and `container-log-max-files` can be used to configure the maximum size for each log file and the maximum number of files allowed for each container respectively.
163+
-->
164+
当使用某 *CRI 容器运行时* 时,kubelet 要负责对日志进行轮换,并
165+
管理日志目录的结构。kubelet 将此信息发送给 CRI 容器运行时,后者
166+
将容器日志写入到指定的位置。kubelet 标志 `container-log-max-size`
167+
`container-log-max-files` 可以用来配置每个日志文件的最大长度
168+
和每个容器可以生成的日志文件个数上限。
169+
160170
<!--
161171
When you run [`kubectl logs`](/docs/reference/generated/kubectl/kubectl-commands#logs) as in
162172
the basic logging example, the kubelet on the node handles the request and
@@ -166,14 +176,15 @@ reads directly from the log file. The kubelet returns the content of the log fil
166176
节点上的 kubelet 处理该请求并直接读取日志文件,同时在响应中返回日志文件内容。
167177

168178
<!--
169-
If an external system has performed the rotation,
179+
If an external system has performed the rotation or a CRI container runtime is used,
170180
only the contents of the latest log file will be available through
171181
`kubectl logs`. For example, if there's a 10MB file, `logrotate` performs
172182
the rotation and there are two files: one file that is 10MB in size and a second file that is empty.
173183
`kubectl logs` returns the latest log file which in this example is an empty response.
174184
-->
175185
{{< note >}}
176-
如果有外部系统执行日志轮转,那么 `kubectl logs` 仅可查询到最新的日志内容。
186+
如果有外部系统执行日志轮转或者使用了 CRI 容器运行时,那么 `kubectl logs`
187+
仅可查询到最新的日志内容。
177188
比如,对于一个 10MB 大小的文件,通过 `logrotate` 执行轮转后生成两个文件,
178189
一个 10MB 大小,一个为空,`kubectl logs` 返回最新的日志文件,而该日志文件
179190
在这个例子中为空。

content/zh/docs/concepts/cluster-administration/system-metrics.md

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,14 @@ cloudprovider_gce_api_request_duration_seconds { request = "list_disk"}
247247

248248
<!--
249249
### kube-scheduler metrics
250-
251-
{{< feature-state for_k8s_version="v1.20" state="alpha" >}}
252-
253-
The scheduler exposes optional metrics that reports the requested resources and the desired limits of all running pods. These metrics can be used to build capacity planning dashboards, assess current or historical scheduling limits, quickly identify workloads that cannot schedule due to lack of resources, and compare actual usage to the pod's request.
254250
-->
255251
### kube-scheduler 指标 {#kube-scheduler-metrics}
256252

257-
{{< feature-state for_k8s_version="v1.20" state="alpha" >}}
253+
{{< feature-state for_k8s_version="v1.21" state="beta" >}}
258254

255+
<!--
256+
The scheduler exposes optional metrics that reports the requested resources and the desired limits of all running pods. These metrics can be used to build capacity planning dashboards, assess current or historical scheduling limits, quickly identify workloads that cannot schedule due to lack of resources, and compare actual usage to the pod's request.
257+
-->
259258
调度器会暴露一些可选的指标,报告所有运行中 Pods 所请求的资源和期望的约束值。
260259
这些指标可用来构造容量规划监控面板、访问调度约束的当前或历史数据、
261260
快速发现因为缺少资源而无法被调度的负载,或者将 Pod 的实际资源用量
@@ -287,7 +286,7 @@ kube-scheduler 组件能够辩识各个 Pod 所配置的资源
287286
Once a pod reaches completion (has a `restartPolicy` of `Never` or `OnFailure` and is in the `Succeeded` or `Failed` pod phase, or has been deleted and all containers have a terminated state) the series is no longer reported since the scheduler is now free to schedule other pods to run. The two metrics are called `kube_pod_resource_request` and `kube_pod_resource_limit`.
288287
289288
The metrics are exposed at the HTTP endpoint `/metrics/resources` and require the same authorization as the `/metrics`
290-
endpoint on the scheduler. You must use the `--show-hidden-metrics-for-version=1.20` flag to expose these alpha stability metrics.
289+
endpoint on the scheduler. You must use the `-show-hidden-metrics-for-version=1.20` flag to expose these alpha stability metrics.
291290
-->
292291
一旦 Pod 进入完成状态(其 `restartPolicy``Never``OnFailure`,且
293292
其处于 `Succeeded``Failed` Pod 阶段,或者已经被删除且所有容器都具有
@@ -299,6 +298,42 @@ endpoint on the scheduler. You must use the `--show-hidden-metrics-for-version=1
299298
`--show-hidden-metrics-for-version=1.20` 标志才能暴露那些稳定性为 Alpha
300299
的指标。
301300

301+
<!--
302+
## Disabling metrics
303+
304+
You can explicitly turn off metrics via command line flag `--disabled-metrics`. This may be desired if, for example, a metric is causing a performance problem. The input is a list of disabled metrics (i.e. `--disabled-metrics=metric1,metric2`).
305+
-->
306+
## 禁用指标 {#disabling-metrics}
307+
308+
你可以通过命令行标志 `--disabled-metrics` 来关闭某指标。
309+
在例如某指标会带来性能问题的情况下,这一操作可能是有用的。
310+
标志的参数值是一组被禁止的指标(例如:`--disabled-metrics=metric1,metric2`)。
311+
312+
<!--
313+
## Metric cardinality enforcement
314+
315+
Metrics with unbounded dimensions could cause memory issues in the components they instrument. To limit resource use, you can use the `--allow-label-value` command line option to dynamically configure an allow-list of label values for a metric.
316+
-->
317+
## 指标顺序性保证 {#metric-cardinality-enforcement}
318+
319+
在 Alpha 阶段,标志只能接受一组映射值作为可以使用的指标标签。
320+
每个映射值的格式为`<指标名称>,<标签名称>=<可用标签列表>`,其中
321+
`<可用标签列表>` 是一个用逗号分隔的、可接受的标签名的列表。
322+
323+
<!--
324+
The overall format looks like:
325+
`--allow-label-value <metric_name>,<label_name>='<allow_value1>, <allow_value2>...', <metric_name2>,<label_name>='<allow_value1>, <allow_value2>...', ...`.
326+
-->
327+
最终的格式看起来会是这样:
328+
`--allow-label-value <指标名称>,<标签名称>='<可用值1>,<可用值2>...', <指标名称2>,<标签名称>='<可用值1>, <可用值2>...', ...`.
329+
330+
<!--
331+
Here is an example:
332+
-->
333+
下面是一个例子:
334+
335+
`--allow-label-value number_count_metric,odd_number='1,3,5', number_count_metric,even_number='2,4,6', date_gauge_metric,weekend='Saturday,Sunday'`
336+
302337
## {{% heading "whatsnext" %}}
303338

304339
<!--

0 commit comments

Comments
 (0)