prometheus监控k8s集群系列之kube-state-metrics

本文介绍了kube-state-metrics在K8s集群监控中的作用,它专注于监控deployments、nodes和pods等对象的状态。通过示例展示了如何部署和配置kube-state-metrics,以及如何利用Prometheus抓取和展示相关metrics,如节点状态、副本数量、Pod运行状况等,以确保集群健康。

前言

前面我们已经介绍了通过cadvisor和node-exporter来监控k8s集群容器和主机资源,今天向大家介绍一下kube-state-metrics对k8s集群的监控,那它主要是监控哪些内容的呢?我们先看一下官方的介绍

kube-state-metrics 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.

从官方介绍中,我们可以知道,kube-state-metrics并不聚焦于k8s集群整体及相关组件的监控,而是更加关注deployments, nodes and pods等内部对象的状态。

例如:

  • 现在计划了多少个副本?目前有多少可用?
  • 有多少个 Pod 正在运行、已停止、已终止?
  • 此 Pod 已重启多少次?

指标类型概览:

  • CertificateSigningRequest Metrics
  • ConfigMap Metrics
  • CronJob Metrics
  • DaemonSet Metrics
  • Deployment Metrics
  • Endpoint Metrics
  • Horizontal Pod Autoscaler Metrics
  • Ingress Met
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值