使用prometheus和mimir做k8s多集群监控

使用prometheus和mimir做k8s多集群监控

💡 原文中文,约8900字,阅读约需22分钟。
📝

内容提要

本文介绍了使用 Grafana 的 Mimir 替换 Thanos 进行多集群监控的部署过程,包括单体模式、微服务模式和读写模式。作者使用 Kustomize 和 ArgoCD 进行部署,同时介绍了如何部署 MinIO 和 Prometheus,并添加 exporter 采集数据。

🎯

关键要点

  • 本文介绍了使用 Grafana 的 Mimir 替换 Thanos 进行多集群监控的部署过程。
  • Mimir 提供了三种部署模式:单体模式、微服务模式和读写模式。
  • 单体模式适合小规模监控系统,微服务模式适合大规模应用,读写模式适合中等规模应用。
  • 部署使用 Kustomize 和 ArgoCD,所有 YAML 文件通过 Kustomization 编译。
  • Mimir 支持的存储包括 Amazon S3、Google Cloud Storage、Azure Blob Storage 和 Swift。
  • MinIO 被定义为 StatefulSet,后端 PVC 可根据实际情况调整。
  • Mimir 的部署包括多个节点,支持横向扩展。
  • Prometheus 必须以 agent 模式运行,以避免数据丢失。
  • 配置 Prometheus 时使用 hostAliases 增强安全性,避免 DNS 解析。
  • 后续工作包括添加各种 exporter 以采集数据,Prometheus 更加优雅。
➡️

继续阅读