Metrics in Kubernetes: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 9: Line 9:
=Metric Pipeline=
=Metric Pipeline=


A metric pipeline is a solution that allows metrics collection, propagation, possibly storage, and publishing. In Kubernetes, application monitoring does not depend on a single monitoring solution. Kubernetes allows for different types of metric pipelines: resource metrics pipelines and full metrics piplelines.
A metric pipeline is a solution that allows metrics collection, propagation, possibly storage, and publishing. In Kubernetes, application monitoring does not depend on a single monitoring solution. Kubernetes allows for different types of metric pipelines: [[#Resource_Metrics_Pipeline|resource metrics pipelines]] and [[#Full_Metrics_Pipeline|full metrics pipelines]].


==Resource Metrics Pipeline==
==Resource Metrics Pipeline==

Revision as of 23:11, 5 October 2020

Internal

Overview

Application health monitoring, resource consumption monitoring and scaling decisions require metrics collection and analysis. Kubernetes facilitates metrics collection from containers, pods, services and the overall cluster via metric pipelines.

Metric Pipeline

A metric pipeline is a solution that allows metrics collection, propagation, possibly storage, and publishing. In Kubernetes, application monitoring does not depend on a single monitoring solution. Kubernetes allows for different types of metric pipelines: resource metrics pipelines and full metrics pipelines.

Resource Metrics Pipeline

https://kubernetes.io/docs/tasks/debug-application-cluster/resource-usage-monitoring/#resource-metrics-pipeline

Full Metrics Pipeline

https://kubernetes.io/docs/tasks/debug-application-cluster/resource-usage-monitoring/#full-metrics-pipeline

Resource

Metrics

Resource Metrics

A resource metric is a numeric quantity that tracks either the CPU or memory consumed by containers and pods. By default, the only two supported resource metrics are the CPU utilization and the memory consumed by a container. These resources do not change names from cluster to cluster and they should be available as long the Resource Metrics API is available.

Resource Metrics API

metrics.k8s.io TODO:

Custom Metrics

Aside from resource metrics, there are two other types of metrics, both of which are considered custom metrics: pod metrics and object metrics. Custom metrics track resources used by Kubernetes objects (pods or otherwise).

Pod Metrics

Pod metrics track resources that describe pods.

Object Metrics

Object metrics track resources describe different objects in the same namespace, instead of describing pods.

Custom Metrics API

custom.metrics.k8s.io

Monitoring systems like Prometheus expose application-specific metrics to the Horizontal Pod Autoscaler controller via the Custom Metrics API.

External Metrics

External Metrics API

external.metrics.k8s.io

Sources of Metrics

Kubernetes Metrics Server

Kubernetes Metrics Server

Prometheus

Prometheus

Notes