Skip to content

Commit 71c048c

Browse files
authored
Merge pull request #36583 from yanrongshi/zh-cn]Sync-/docs/tasks/debug/debug-cluster/resource-metrics-pipeline.md
[zh-cn]Fix layout of resource-metrics-pipeline.md
2 parents 0f034f2 + 534e79c commit 71c048c

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

content/zh-cn/docs/tasks/debug/debug-cluster/resource-metrics-pipeline.md

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You can also view the resource metrics using the
3030
command.
3131
-->
3232

33-
对于 Kubernetes,_Metrics API_ 提供了一组基本的指标,以支持自动伸缩和类似的用例。
33+
对于 Kubernetes,**Metrics API** 提供了一组基本的指标,以支持自动伸缩和类似的用例。
3434
该 API 提供有关节点和 Pod 的资源使用情况的信息,
3535
包括 CPU 和内存的指标。如果将 Metrics API 部署到集群中,
3636
那么 Kubernetes API 的客户端就可以查询这些信息,并且可以使用 Kubernetes 的访问控制机制来管理权限。
@@ -51,7 +51,7 @@ the simpler Metrics API by deploying a second
5151
that uses the _Custom Metrics API_.
5252
-->
5353
Metrics API 及其启用的指标管道仅提供最少的 CPU 和内存指标,以启用使用 HPA 和/或 VPA 的自动扩展。
54-
如果你想提供更完整的指标集,你可以通过部署使用 _Custom Metrics API_ 的第二个
54+
如果你想提供更完整的指标集,你可以通过部署使用 **Custom Metrics API** 的第二个
5555
[指标管道](/zh-cn/docs/tasks/debug/debug-cluster/resource-usage-monitoring/#full-metrics-pipeline)来作为简单的 Metrics API 的补充。
5656
{{< /note >}}
5757

@@ -158,14 +158,18 @@ metrics-server 实现了 Metrics API。此 API 允许你访问集群中节点和
158158
kubectl get --raw "/apis/metrics.k8s.io/v1beta1/nodes/minikube" | jq '.'
159159
```
160160

161-
<!-- Here is the same API call using `curl`: -->
161+
<!--
162+
Here is the same API call using `curl`:
163+
-->
162164
这是使用 `curl` 来执行的相同 API 调用:
163165

164166
```shell
165167
curl http://localhost:8080/apis/metrics.k8s.io/v1beta1/nodes/minikube
166168
```
167169

168-
<!-- Sample response: -->
170+
<!--
171+
Sample response:
172+
-->
169173
响应示例:
170174

171175
```json
@@ -198,14 +202,18 @@ Here is an example of the Metrics API request for a `kube-scheduler-minikube` po
198202
kubectl get --raw "/apis/metrics.k8s.io/v1beta1/namespaces/kube-system/pods/kube-scheduler-minikube" | jq '.'
199203
```
200204

201-
<!-- Here is the same API call using `curl`: -->
205+
<!--
206+
Here is the same API call using `curl`:
207+
-->
202208
这是使用 `curl` 来完成的相同 API 调用:
203209

204210
```shell
205211
curl http://localhost:8080/apis/metrics.k8s.io/v1beta1/namespaces/kube-system/pods/kube-scheduler-minikube
206212
```
207213

208-
<!-- Sample response: -->
214+
<!--
215+
Sample response:
216+
-->
209217
响应示例:
210218

211219
```json
@@ -238,7 +246,7 @@ repository. You must enable the [API aggregation layer](/docs/tasks/extend-kuber
238246
and register an [APIService](/docs/reference/kubernetes-api/cluster-resources/api-service-v1/)
239247
for the `metrics.k8s.io` API.
240248
241-
To learn more about the Metrics API, see [resource metrics API design](https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/resource-metrics-api.md),
249+
To learn more about the Metrics API, see [resource metrics API design](https://git.k8s.io/design-proposals-archive/instrumentation/resource-metrics-api.md),
242250
the [metrics-server repository](https://github.com/kubernetes-sigs/metrics-server) and the
243251
[resource metrics API](https://github.com/kubernetes/metrics#resource-metrics-api).
244252
-->
@@ -248,7 +256,7 @@ Metrics API 在 [k8s.io/metrics](https://github.com/kubernetes/metrics) 代码
248256
`metrics.k8s.io` API 注册一个 [APIService](/zh-cn/docs/reference/kubernetes-api/cluster-resources/api-service-v1/)
249257

250258
要了解有关 Metrics API 的更多信息,
251-
请参阅资源 [Resource Metrics API Design](https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/resource-metrics-api.md)
259+
请参阅资源 [Resource Metrics API Design](https://git.k8s.io/design-proposals-archive/instrumentation/resource-metrics-api.md)
252260
[metrics-server 代码库](https://github.com/kubernetes-sigs/metrics-server)
253261
[Resource Metrics API](https://github.com/kubernetes/metrics#resource-metrics-api)
254262

@@ -261,7 +269,7 @@ to access it.
261269
{{< /note >}}
262270

263271
<!--
264-
## Measuring Resource Usage
272+
## Measuring resource usage
265273
266274
### CPU
267275
@@ -362,7 +370,7 @@ To learn more about the metrics-server, see the
362370
363371
You can also check out the following:
364372
365-
* [metrics-server design](https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/metrics-server.md)
373+
* [metrics-server design](https://git.k8s.io/design-proposals-archive/instrumentation/metrics-server.md)
366374
* [metrics-server FAQ](https://github.com/kubernetes-sigs/metrics-server/blob/master/FAQ.md)
367375
* [metrics-server known issues](https://github.com/kubernetes-sigs/metrics-server/blob/master/KNOWN_ISSUES.md)
368376
* [metrics-server releases](https://github.com/kubernetes-sigs/metrics-server/releases)
@@ -373,23 +381,24 @@ You can also check out the following:
373381

374382
你还可以查看以下内容:
375383

376-
* [metrics-server 设计](https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/metrics-server.md)
384+
* [metrics-server 设计](https://git.k8s.io/design-proposals-archive/instrumentation/metrics-server.md)
377385
* [metrics-server FAQ](https://github.com/kubernetes-sigs/metrics-server/blob/master/FAQ.md)
378386
* [metrics-server known issues](https://github.com/kubernetes-sigs/metrics-server/blob/master/KNOWN_ISSUES.md)
379387
* [metrics-server releases](https://github.com/kubernetes-sigs/metrics-server/releases)
380388
* [Horizontal Pod Autoscaling](/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale/)
381389

382390
<!--
383-
### Summary API Source
391+
### Summary API source
384392
385-
The [Kubelet](/docs/reference/command-line-tools-reference/kubelet/) gathers stats at node, volume, pod and container level, and emits
386-
them in the [Summary API](https://github.com/kubernetes/kubernetes/blob/7d309e0104fedb57280b261e5677d919cb2a0e2d/staging/src/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go)
393+
The [kubelet](/docs/reference/command-line-tools-reference/kubelet/) gathers stats at the node,
394+
volume, pod and container level, and emits this information in
395+
the [Summary API](https://github.com/kubernetes/kubernetes/blob/7d309e0104fedb57280b261e5677d919cb2a0e2d/staging/src/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go)
387396
for consumers to read.
388397
-->
389398

390399
### Summary API 来源 {#summary-api-source}
391400

392-
[Kubelet](/zh-cn/docs/reference/command-line-tools-reference/kubelet/) 在节点、卷、Pod 和容器级别收集统计信息,
401+
[kubelet](/zh-cn/docs/reference/command-line-tools-reference/kubelet/) 在节点、卷、Pod 和容器级别收集统计信息,
393402
并在 [Summary API](https://github.com/kubernetes/kubernetes/blob/7d309e0104fedb57280b261e5677d919cb2a0e2d/staging/src/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go)
394403
中提供它们的统计信息供消费者阅读。
395404

@@ -403,7 +412,9 @@ Here is an example of a Summary API request for a `minikube` node:
403412
kubectl get --raw "/api/v1/nodes/minikube/proxy/stats/summary"
404413
```
405414

406-
<!-- Here is the same API call using `curl`: -->
415+
<!--
416+
Here is the same API call using `curl`:
417+
-->
407418
这是使用 `curl` 来执行的相同 API 调用:
408419

409420
```shell

0 commit comments

Comments
 (0)