Skip to content

Commit 3b9ac14

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

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-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,47 @@
1+
---
2+
approvers:
3+
- fgrzadkowski
4+
- piosz
5+
title: Core metrics pipeline
6+
---
7+
8+
Resource usage metrics are important for:
9+
10+
- Kubernetes components to operate (e.g. autoscalers to automatically scale user applications)
11+
- Kubernetes users to understand their applications behavior
12+
13+
In Kubernetes they are available through Metrics API.
14+
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.
22+
It also offers the same security, scalability and reliability guarantees.
23+
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
35+
36+
## Metrics Server
37+
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.
41+
42+
It discovers all nodes in the cluster and queries usage information from Summary API exposed by [Kubelet](/docs/admin/kubelet/)s.
43+
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/).
46+
47+
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)