安装kube-prometheus
发布时间:2020-12-25 10:41:06编辑:admin阅读(64)
一、概述
简介
kube-prometheus 是一整套监控解决方案,它使用 Prometheus 采集集群指标,Grafana 做展示,包含如下组件:The Prometheus Operator
Highly available Prometheus
Highly available Alertmanager
Prometheus node-exporter
Prometheus Adapter for Kubernetes Metrics APIs (k8s-prometheus-adapter)
kube-state-metrics
Grafana
二、安装
环境说明
操作系统:centos 7.6
k8s版本:1.18.1
ip地址:10.212.82.63
主机名:k8s-master
配置:2核2g
操作系统:centos 7.6
k8s版本:1.18.1
ip地址:10.212.82.65
主机名:k8s-node01
配置:2核8g
下载项目
以下步骤,请在k8s-master上执行。
安装git工具yum install -y git
克隆kube-prometheusgit clone https://github.com/coreos/kube-prometheus
查看manifest[root@k8s-master]# cd kube-prometheus/manifests/
[root@k8s-master manifests]# ll
输出:总用量 1696
-rw-r--r-- 1 root root 405 12月 17 10:25 alertmanager-alertmanager.yaml
-rw-r--r-- 1 root root 964 12月 17 10:17 alertmanager-secret.yaml
-rw-r--r-- 1 root root 96 12月 17 10:17 alertmanager-serviceAccount.yaml
-rw-r--r-- 1 root root 254 12月 17 10:17 alertmanager-serviceMonitor.yaml
-rw-r--r-- 1 root root 326 12月 17 10:20 alertmanager-service.yaml
-rw-r--r-- 1 root root 550 12月 17 10:17 grafana-dashboardDatasources.yaml
-rw-r--r-- 1 root root 1403795 12月 17 10:17 grafana-dashboardDefinitions.yaml
-rw-r--r-- 1 root root 454 12月 17 10:17 grafana-dashboardSources.yaml
-rw-r--r-- 1 root root 7722 12月 17 10:17 grafana-deployment.yaml
-rw-r--r-- 1 root root 86 12月 17 10:17 grafana-serviceAccount.yaml
-rw-r--r-- 1 root root 208 12月 17 10:17 grafana-serviceMonitor.yaml
-rw-r--r-- 1 root root 273 12月 17 10:20 grafana-service.yaml
-rw-r--r-- 1 root root 376 12月 17 10:17 kube-state-metrics-clusterRoleBinding.yaml
-rw-r--r-- 1 root root