11. API server
• Core component to communicate with k8s in control plane
• Expose Resource Metrics API to the following components
• kubectl top
• kube-scheduler
• HPA
• …
source: https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/resource-metrics-api.md
11
12. metrics-server
• Store locally only latest values
• Expose the master metrics API
source: https://github.com/kubernetes-sigs/metrics-server
12
13. REST server: API server -> metrics-server
13
metrics-server/pkg/storage/node.go
metrics-server/pkg/storage/types.go
17. Kubelet
• The daemon that runs on every kubernetes node and controls pod
and container lifecycle, among many other things.
• Combine container-level metrics form cAdvisor/CRI with the kubelets
knowledge of kubernetes constructs to produce the kubelet Summary
statistics.
source: https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/core-metrics-pipeline.md
17
21. Container Runtime Interface (CRI)
• The Container Runtime Interface designed to provide an abstraction
over runtimes (docker, rkt, etc).
• Consist of specs, protobuf API and libraries for container runtimes to
integrate with kubelet on a node
source:https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/core-metrics-pipeline.md
21
29. • In Kubernetes Monitoring Architecture,
• Each component is responsible for producing, scraping and leveraging the
metrics
• Each component is communicated with API, such as RESTful API and gRPC
29
33. cgroup
• cgroup core organizes processes hierarchically
• cgroup controller distributes system resources along the hierarchy in
a controlled and configurable manner.
• cgroup controllers:
• cpu
• memory
• …
source:https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt
33
source:https://www.kernel.org/doc/Documentation/cgroup-v1/cpuacct.txt