y80.第四章 Prometheus大厂监控体系及实战 -- kube-state-metrics组件介绍和监控扩展(十一)

9.kube-state-metrics组件介绍

kubernetes-state-metrics:通过监听API Server生成有关资源对象的状态指标,比如Deployment、Node、Pod,需要注意的是kube-state-metrics只是简单的提供一个metrics数据,并不会存储这些指标数据,所以我们可以使用Prometheus来抓取这些数据然后存储,主要关注的是业务相关的一些元数据,比如Deploument、Pod、副本状态等,调度了多少个replicas?现在可用有几个?;多少个Pod是running/stopped/terminated状态?;Pod重启了多少次?;我有多少job在运行中。

kube-state-metrics (KSM) is a simple service that listens to the Kubernetes API server and generates metrics about the state of the objects. 

Github:https://github.com/kubernetes/kube-state-metrics

https://quay.io/repository/coreos/kube-state-metrics?tag=latest&tab=tags

指标:https://xie.infoq.cn/article/9e1fff6306649e65480a96bb1

9.1 部署kube-state-metrics

root@k8s-master1:~/prome

猜你喜欢

转载自blog.csdn.net/qq_25599925/article/details/125036096