Skip to content

Commit 1d10116

Browse files
committed
addressed review comments
1 parent 3b9ac14 commit 1d10116

File tree

1 file changed

+22
-28
lines changed

1 file changed

+22
-28
lines changed

docs/tasks/debug-application-cluster/core-metrics-pipeline.md

+22-28
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,37 @@ approvers:
55
title: Core metrics pipeline
66
---
77

8-
Resource usage metrics are important for:
8+
Starting from Kubernetes 1.8, resource usage metrics, such as container CPU and memory usage,
9+
are available in Kubernetes though the the Metrics API. These metrics can be either accessed directly
10+
by user, for example by using `kubectl top` command, or used by a controller in the cluster, e.g.
11+
Horizontal Pod Autoscaler to make decisions.
912

10-
- Kubernetes components to operate (e.g. autoscalers to automatically scale user applications)
11-
- Kubernetes users to understand their applications behavior
13+
## The Metrics API
1214

13-
In Kubernetes they are available through Metrics API.
15+
Through the Metrics API you can get the amount of resource currently used
16+
by a given node or a given pod. This API doesn't store the metric values,
17+
so it's not possible for example to get the amount of resources used by a
18+
given node 10 minutes ago.
1419

15-
## Metrics API
16-
17-
Metrics API provides current resource usage metrics for pods and nodes. It doesn't offer historical metrics, so one needs to
18-
archive metrics themselves. In the future Historical API might be defined but it will not be implemented as a part of
19-
the core metrics pipeline.
20-
21-
The API is discoverable through the same endpoint as the other Kubernetes APIs under `/apis/metrics.k8s.io/` path.
20+
The API no different from any other API:
21+
it is discoverable through the same endpoint as the other Kubernetes APIs under `/apis/metrics.k8s.io/` path.
2222
It also offers the same security, scalability and reliability guarantees.
2323

24-
The API is defined in [k8s.io/metrics](https://github.com/kubernetes/metrics/tree/master/pkg/apis/metrics) repository,
25-
where the detailed semantic is explained.
26-
27-
### Supported endpoints
28-
29-
The list of supported endpoints in the API:
30-
31-
- `/nodes` - all node metrics; support for `labelSelector` parameter
32-
- `/nodes/{node}` - metrics for the specified node
33-
- `/namespaces/{namespace}/pods` - all pod metrics within the namespace; support for `labelSelector` parameter
34-
- `/namespaces/{namespace}/pods/{pod}` - metrics for the specified pods
24+
The API is defined in [k8s.io/metrics](https://github.com/kubernetes/metrics/blob/master/pkg/apis/metrics/v1beta1/types.go)
25+
repository. You can find more information about the API resources there.
3526

3627
## Metrics Server
3728

38-
[Metrics Server](https://github.com/kubernetes-incubator/metrics-server) is a cluster-wide aggregator of monitoring data.
39-
Starting from Kubernetes 1.8 it's work on all Kubernetes setups
40-
and runs as a pod in a user space (on one of the nodes), similar to how any Kubernetes application would run.
29+
[Metrics Server](https://github.com/kubernetes-incubator/metrics-server) is a cluster-wide aggregator of resource usage data.
30+
Starting from Kubernetes 1.8 it's deployed by default in clusters crated by `kube-up.sh` script
31+
as a Deployment object.
32+
User can deploy it also using the provided [deployment yamls](https://github.com/kubernetes-incubator/metrics-server/tree/master/deploy).
33+
It's supported in Kubernetes 1.7+ (see details below).
4134

42-
It discovers all nodes in the cluster and queries usage information from Summary API exposed by [Kubelet](/docs/admin/kubelet/)s.
35+
Metric server collects metrics from the Summary API, exposed by [Kubelet](/docs/admin/kubelet/) on each node.
4336

44-
Metrics Server use the same authorization/authentication mechanism as the main API server. It's registered there through
45-
[Kubernetes aggregator](https://kubernetes.io/docs/concepts/api-extension/apiserver-aggregation/).
37+
Metrics Server registered in the main API server through
38+
[Kubernetes aggregator](https://kubernetes.io/docs/concepts/api-extension/apiserver-aggregation/),
39+
which was introduced in Kubernetes 1.7.
4640

4741
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

Comments
 (0)