Skip to content

Commit cf139fb

Browse files
authored
Merge pull request #36585 from yanrongshi/zh-cn]Sync-/docs/tasks/debug/debug-cluster/resource-usage-monitoring.md
[zh-cn]Sync resource-usage-monitoring.md
2 parents bf0f04d + cc4582d commit cf139fb

File tree

1 file changed

+36
-8
lines changed

1 file changed

+36
-8
lines changed

content/zh-cn/docs/tasks/debug/debug-cluster/resource-usage-monitoring.md

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ where bottlenecks can be removed to improve overall performance.
2424
-->
2525
要扩展应用程序并提供可靠的服务,你需要了解应用程序在部署时的行为。
2626
你可以通过检测容器检查 Kubernetes 集群中的应用程序性能,
27-
[Pods](/zh-cn/docs/concepts/workloads/pods),
27+
[Pod](/zh-cn/docs/concepts/workloads/pods),
2828
[服务](/zh-cn/docs/concepts/services-networking/service/)
2929
和整个集群的特征。
3030
Kubernetes 在每个级别上提供有关应用程序资源使用情况的详细信息。
@@ -46,7 +46,7 @@ On new clusters, you can use [resource metrics](#resource-metrics-pipeline) or
4646
4747
The resource metrics pipeline provides a limited set of metrics related to
4848
cluster components such as the
49-
[Horizontal Pod Autoscaler](/docs/tasks/run-application/horizontal-pod-autoscale)
49+
[Horizontal Pod Autoscaler](/docs/tasks/run-application/horizontal-pod-autoscale/)
5050
controller, as well as the `kubectl top` utility.
5151
These metrics are collected by the lightweight, short-term, in-memory
5252
[metrics-server](https://github.com/kubernetes-sigs/metrics-server) and
@@ -69,8 +69,11 @@ memory usage. The kubelet acts as a bridge between the Kubernetes master and
6969
the nodes, managing the pods and containers running on a machine. The kubelet
7070
translates each pod into its constituent containers and fetches individual
7171
container usage statistics from the container runtime through the container
72-
runtime interface. The kubelet fetches this information from the integrated
73-
cAdvisor for the legacy Docker integration. It then exposes the aggregated pod
72+
runtime interface. If you use a container runtime that uses Linux cgroups and
73+
namespaces to implement containers, and the container runtime does not publish
74+
usage statistics, then the kubelet can look up those statistics directly
75+
(using code from [cAdvisor](https://github.com/google/cadvisor)).
76+
No matter how those statistics arrive, the kubelet then exposes the aggregated pod
7477
resource usage statistics through the metrics-server Resource Metrics API.
7578
This API is served at `/metrics/resource/v1beta1` on the kubelet's authenticated and
7679
read-only ports.
@@ -79,10 +82,12 @@ read-only ports.
7982
[kubelet](/zh-cn/docs/reference/command-line-tools-reference/kubelet/)
8083
以获取 CPU 和内存使用情况。
8184
Kubelet 充当 Kubernetes 主节点与节点之间的桥梁,管理机器上运行的 Pod 和容器。
82-
kubelet 将每个 Pod 转换为其组成的容器,并在容器运行时通过容器运行时接口
83-
获取各个容器使用情况统计信息。
84-
kubelet 从集成的 cAdvisor 获取此信息,以进行旧式 Docker 集成。
85-
然后,它通过 metrics-server Resource Metrics API 公开聚合的 pod 资源使用情况统计信息。
85+
kubelet 将每个 Pod 转换为其组成的容器,并通过容器运行时接口从容器运行时获取各个容器使用情况统计信息。
86+
如果某个容器运行时使用 Linux cgroups 和名字空间来实现容器。
87+
并且这一容器运行时不发布资源用量统计信息,
88+
那么 kubelet 可以直接查找这些统计信息(使用来自 [cAdvisor](https://github.com/google/cadvisor) 的代码)。
89+
无论这些统计信息如何到达,kubelet 都会通过 metrics-server Resource Metrics API 公开聚合的
90+
Pod 资源用量统计信息。
8691
该 API 在 kubelet 的经过身份验证和只读的端口上的 `/metrics/resource/v1beta1` 中提供。
8792

8893
<!--
@@ -111,3 +116,26 @@ Full metrics pipeline projects that are not part of the CNCF are outside the sco
111116
节点和 Prometheus 本身。
112117
完整度量管道项目不属于 CNCF 的一部分,不在 Kubernetes 文档的范围之内。
113118

119+
<!--
120+
## {{% heading "whatsnext" %}}
121+
122+
123+
Learn about additional debugging tools, including:
124+
125+
* [Logging](/docs/concepts/cluster-administration/logging/)
126+
* [Monitoring](/docs/tasks/debug/debug-cluster/resource-usage-monitoring/)
127+
* [Getting into containers via `exec`](/docs/tasks/debug/debug-application/get-shell-running-container/)
128+
* [Connecting to containers via proxies](/docs/tasks/extend-kubernetes/http-proxy-access-api/)
129+
* [Connecting to containers via port forwarding](/docs/tasks/access-application-cluster/port-forward-access-application-cluster/)
130+
* [Inspect Kubernetes node with crictl](/docs/tasks/debug/debug-cluster/crictl/)
131+
-->
132+
## {{% heading "接下来" %}}
133+
134+
了解其他调试工具,包括:
135+
136+
* [日志记录](/zh-cn/docs/concepts/cluster-administration/logging/)
137+
* [监控](/zh-cn/docs/tasks/debug/debug-cluster/resource-usage-monitoring/)
138+
* [通过 `exec` 进入容器](/zh-cn/docs/tasks/debug/debug-application/get-shell-running-container/)
139+
* [通过代理连接到容器](/zh-cn/docs/tasks/extend-kubernetes/http-proxy-access-api/)
140+
* [通过端口转发连接到容器](/zh-cn/docs/tasks/access-application-cluster/port-forward-access-application-cluster/)
141+
* [使用 crictl 检查 Kubernetes 节点](/zh-cn/docs/tasks/debug/debug-cluster/crictl/)

0 commit comments

Comments
 (0)