Skip to content

Commit e30fc3b

Browse files
committed
Added documentation for Metrics Server
1 parent b3cf89c commit e30fc3b

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

_data/tasks.yml

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ toc:
8080

8181
- title: Monitor, Log, and Debug
8282
section:
83+
- docs/tasks/debug-application-cluster/core-metrics-pipeline.md
8384
- docs/tasks/debug-application-cluster/resource-usage-monitoring.md
8485
- docs/tasks/debug-application-cluster/get-shell-running-container.md
8586
- docs/tasks/debug-application-cluster/monitor-node-health.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
approvers:
3+
- fgrzadkowski
4+
- piosz
5+
title: Core metrics pipeline
6+
---
7+
8+
Resource usage metrics are important for:
9+
* Kubernetes components to operate (e.g. autoscalers to automatically scale user applications)
10+
* Kubernetes users to understand their applications behavior
11+
12+
In Kubernetes they are available through Metrics API.
13+
14+
## Metrics API
15+
16+
Metrics API provides current resource usage metrics for pods and nodes. It doesn't offer historical metrics, so one needs to
17+
archive metrics themselves. In the future Historical API might be defined but it will not be implemented as a part of
18+
the core metrics pipeline.
19+
20+
The API is discoverable through the same endpoint as the other Kubernetes APIs under `/apis/metrics.k8s.io/` path.
21+
It also offers the same security, scalability and reliability guarantees.
22+
23+
The API is defined in [k8s.io/metrics](https://github.com/kubernetes/metrics/tree/master/pkg/apis/metrics) repository,
24+
where the detailed semantic is explained.
25+
26+
### Supported endpoints
27+
28+
The list of supported endpoints in the API:
29+
30+
- `/nodes` - all node metrics; support for `labelSelector` parameter
31+
- `/nodes/{node}` - metrics for the specified node
32+
- `/namespaces/{namespace}/pods` - all pod metrics within the namespace; support for `labelSelector` parameter
33+
- `/namespaces/{namespace}/pods/{pod}` - metrics for the specified pods
34+
35+
## Metrics Server
36+
37+
[Metrics Server](https://github.com/kubernetes-incubator/metrics-server) is a cluster-wide aggregator of monitoring data.
38+
Starting from Kubernetes 1.8 it's work on all Kubernetes setups
39+
and runs as a pod in a user space (on one of the nodes), similar to how any Kubernetes application would run.
40+
41+
It discovers all nodes in the cluster and queries usage information from Summary API exposed by [Kubelet](/docs/admin/kubelet/)s.
42+
43+
Metrics Server use the same authorization/authentication mechanism as the main API server. It's registered there through
44+
[Kubernetes aggregator](https://kubernetes.io/docs/concepts/api-extension/apiserver-aggregation/).
45+
46+
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)