@@ -24,7 +24,7 @@ where bottlenecks can be removed to improve overall performance.
24
24
-->
25
25
要扩展应用程序并提供可靠的服务,你需要了解应用程序在部署时的行为。
26
26
你可以通过检测容器检查 Kubernetes 集群中的应用程序性能,
27
- [ Pods ] ( /zh-cn/docs/concepts/workloads/pods ) ,
27
+ [ Pod ] ( /zh-cn/docs/concepts/workloads/pods ) ,
28
28
[ 服务] ( /zh-cn/docs/concepts/services-networking/service/ )
29
29
和整个集群的特征。
30
30
Kubernetes 在每个级别上提供有关应用程序资源使用情况的详细信息。
@@ -46,7 +46,7 @@ On new clusters, you can use [resource metrics](#resource-metrics-pipeline) or
46
46
47
47
The resource metrics pipeline provides a limited set of metrics related to
48
48
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/ )
50
50
controller, as well as the `kubectl top` utility.
51
51
These metrics are collected by the lightweight, short-term, in-memory
52
52
[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
69
69
the nodes, managing the pods and containers running on a machine. The kubelet
70
70
translates each pod into its constituent containers and fetches individual
71
71
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
74
77
resource usage statistics through the metrics-server Resource Metrics API.
75
78
This API is served at `/metrics/resource/v1beta1` on the kubelet's authenticated and
76
79
read-only ports.
@@ -79,10 +82,12 @@ read-only ports.
79
82
[ kubelet] ( /zh-cn/docs/reference/command-line-tools-reference/kubelet/ )
80
83
以获取 CPU 和内存使用情况。
81
84
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 资源用量统计信息。
86
91
该 API 在 kubelet 的经过身份验证和只读的端口上的 ` /metrics/resource/v1beta1 ` 中提供。
87
92
88
93
<!--
@@ -111,3 +116,26 @@ Full metrics pipeline projects that are not part of the CNCF are outside the sco
111
116
节点和 Prometheus 本身。
112
117
完整度量管道项目不属于 CNCF 的一部分,不在 Kubernetes 文档的范围之内。
113
118
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