Skip to content

Commit 96a4aa7

Browse files
pioszsteveperry-53
authored andcommitted
Added documentation for Metrics Server (#5560)
1 parent 5325153 commit 96a4aa7

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-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,44 @@
1+
---
2+
approvers:
3+
- fgrzadkowski
4+
- piosz
5+
title: Core metrics pipeline
6+
---
7+
8+
Starting from Kubernetes 1.8, resource usage metrics, such as container CPU and memory usage,
9+
are available in Kubernetes through 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.
12+
13+
## The Metrics API
14+
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.
19+
20+
The API no different from any other API:
21+
22+
- it is discoverable through the same endpoint as the other Kubernetes APIs under `/apis/metrics.k8s.io/` path
23+
- it offers the same security, scalability and reliability guarantees
24+
25+
The API is defined in [k8s.io/metrics](https://github.com/kubernetes/metrics/blob/master/pkg/apis/metrics/v1beta1/types.go)
26+
repository. You can find more information about the API there.
27+
28+
**Note:** The API requires metrics server to be deployed in the cluster. Otherwise it will be not available.
29+
30+
## Metrics Server
31+
32+
[Metrics Server](https://github.com/kubernetes-incubator/metrics-server) is a cluster-wide aggregator of resource usage data.
33+
Starting from Kubernetes 1.8 it's deployed by default in clusters created by `kube-up.sh` script
34+
as a Deployment object. If you use a different Kubernetes setup mechanism you can deploy it using the provided
35+
[deployment yamls](https://github.com/kubernetes-incubator/metrics-server/tree/master/deploy).
36+
It's supported in Kubernetes 1.7+ (see details below).
37+
38+
Metric server collects metrics from the Summary API, exposed by [Kubelet](/docs/admin/kubelet/) on each node.
39+
40+
Metrics Server registered in the main API server through
41+
[Kubernetes aggregator](https://kubernetes.io/docs/concepts/api-extension/apiserver-aggregation/),
42+
which was introduced in Kubernetes 1.7.
43+
44+
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)