You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Through the Metrics API you can get the amount of resource currently used
30
+
Through the Metrics API, you can get the amount of resource currently used
31
31
by a given node or a given pod. This API doesn't store the metric values,
32
-
so it's not possible for example to get the amount of resources used by a
32
+
so it's not possible, for example, to get the amount of resources used by a
33
33
given node 10 minutes ago.
34
34
-->
35
35
## Metrics API {#the-metrics-api}
36
36
37
37
通过 Metrics API,你可以获得指定节点或 Pod 当前使用的资源量。
38
-
此 API 不存储指标值,因此想要获取某个指定节点 10 分钟前的资源使用量是不可能的。
38
+
此 API 不存储指标值,因此想要获取某个指定节点 10 分钟前的
39
+
资源使用量是不可能的。
39
40
40
41
<!--
41
42
The API is no different from any other API:
42
43
-->
43
44
此 API 与其他 API 没有区别:
44
45
45
46
<!--
46
-
- it is discoverable through the same endpoint as the other Kubernetes APIs under `/apis/metrics.k8s.io/` path
47
-
- it offers the same security, scalability and reliability guarantees
47
+
- it is discoverable through the same endpoint as the other Kubernetes APIs under the path: `/apis/metrics.k8s.io/`
48
+
- it offers the same security, scalability, and reliability guarantees
48
49
-->
49
-
- 此 API 和其它 Kubernetes API 一起位于同一端点(endpoint)之下,是可发现的,
50
+
- 此 API 和其它 Kubernetes API 一起位于同一端点(endpoint)之下且可发现,
50
51
路径为 `/apis/metrics.k8s.io/`
51
-
-它提供相同的安全性、可扩展性和可靠性保证
52
+
-它具有相同的安全性、可扩展性和可靠性保证
52
53
53
54
<!--
54
55
The API is defined in [k8s.io/metrics](https://github.com/kubernetes/metrics/blob/master/pkg/apis/metrics/v1beta1/types.go)
@@ -69,7 +70,11 @@ Metrics API 需要在集群中部署 Metrics Server。否则它将不可用。
69
70
70
71
### CPU
71
72
72
-
CPU is reported as the average usage, in [CPU cores](/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu), over a period of time. This value is derived by taking a rate over a cumulative CPU counter provided by the kernel (in both Linux and Windows kernels). The kubelet chooses the window for the rate calculation.
Learn more about the metrics server in [the design doc](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/instrumentation/metrics-server.md).
0 commit comments