kube-state-metrics¶
- https://github.com/kubernetes/kube-state-metrics
- included by prometheus operator
kube-state-metrics vs. cadvisor¶
To measure a pod’s performance on Fargate, we need metrics like vCPU, memory usage, and network transfers. Prometheus collects these metrics from two sources: cAdvisor and kube-state-metrics.
cadvisor¶
refer: cadvisor
kube-state-metrics¶
kube-state-metrics vs. metrics-server¶
The metrics-server is a project that has been inspired by Heapster and is implemented to serve the goals of core metrics pipelines in Kubernetes monitoring architecture. It is a cluster level component which periodically scrapes metrics from all Kubernetes nodes served by Kubelet through Metrics API. The metrics are aggregated, stored in memory and served in Metrics API format. The metrics-server stores the latest values only and is not responsible for forwarding metrics to third-party destinations.
kube-state-metrics (KSM) is a simple service that listens to the Kubernetes API server and generates metrics about the state of the objects. (See examples in the Metrics section below.) It is not focused on the health of the individual Kubernetes components, but rather on the health of the various objects inside, such as deployments, nodes and pods.
Having kube-state-metrics as a separate project also enables access to these metrics from monitoring systems such as Prometheus.