Skip to content

Kubernetes Metrics sources

In the context of a Kubernetes monitoring ecosystem—often centered around tools like Prometheus—metrics data is typically aggregated via a "Pull" model where the system scrapes exposed HTTP endpoints^[400-devops__06-Kubernetes__k8s-paas__原理及源码解析__Kubernetes相关生态.md].

There are three primary sources of Metrics data within this architecture^[400-devops__06-Kubernetes__k8s-paas__原理及源码解析__Kubernetes相关生态.md]:

  • Host Metrics: Monitoring data for the underlying nodes. This is typically facilitated by a Node Exporter, an auxiliary process that exposes Metrics for the Prometheus server to scrape^[400-devops__06-Kubernetes__k8s-paas__原理及源码解析__Kubernetes相关生态.md].
  • Component Metrics: Data exposed directly by Kubernetes internal components via /metrics APIs (e.g., API Server, kubelet)^[400-devops__06-Kubernetes__k8s-paas__原理及源码解析__Kubernetes相关生态.md]. These Metrics go beyond basic resource usage to include core operational indicators such as Work Queue lengths, Request QPS, and latency^[400-devops__06-Kubernetes__k8s-paas__原理及源码解析__Kubernetes相关生态.md].
  • Core Metrics: Kubernetes-specific object Metrics regarding Pods, Nodes, Containers, and Services^[400-devops__06-Kubernetes__k8s-paas__原理及源码解析__Kubernetes相关生态.md]. These are typically provided by the Metrics Server, an extension designed to supplant Heapster for gathering core monitoring data^[400-devops__06-Kubernetes__k8s-paas__原理及源码解析__Kubernetes相关生态.md].

Monitoring Principles

When planning monitoring indicators, it is recommended to follow industry-standard methodologies to ensure comprehensive coverage^[400-devops__06-Kubernetes__k8s-paas__原理及源码解析__Kubernetes相关生态.md]:

  • USE Method: Primarily for Resources. Focuses on Utilization (average time used), Saturation (congestion level), and Errors^[400-devops__06-Kubernetes__k8s-paas__原理及源码解析__Kubernetes相关生态.md].
  • RED Method: Primarily for Services. Focuses on Request Rate, Errors, and Duration (response time)^[400-devops__06-Kubernetes__k8s-paas__原理及源码解析__Kubernetes相关生态.md].

Sources

  • 400-devops__06-Kubernetes__k8s-paas__原理及源码解析__Kubernetes相关生态.md