一、背景说明
kubernetes1.27集群部署完之后,想要采用kube-prometheus对其进行监控。
1、基于containerd部署,部署完成后,grafana界面有数据展示
2、基于docker-cri部署,完成后grafana界面部分数据未显示
二、原因
参考官网描述信息
-
Docker 节点上的指标格式为
k8s_<container-name>_<pod-name>_<namespace>_<pod-uid>_<restart-count>
, 但其他运行时的格式不同。例如,在 containerd 节点上它是<container-id>
。 -
一些文件系统指标缺失,如下所示:
container_fs_inodes_free
container_fs_inodes_total
container_fs_io_current
container_fs_io_time_seconds_total
container_fs_io_time_weighted_seconds_total
container_fs_limit_bytes
container_fs_read_seconds_total
container_fs_reads_merged_total
container_fs_sector_reads_total
container_fs_sector_writes_total
container_fs_usage_bytes
container_fs_write_seconds_total
container_fs_wri