k8s prometheus+grafana 監控


k8s 添加 Prometheus+Grafana的監控

 
#安裝git,下載yaml
git clone https://github.com/redhatxl/k8s-prometheus-grafana.git
#安裝node-exporter
kubectl create -f  node-exporter.yaml 
#安裝prometheus組件
kubectl create -f  k8s-prometheus-grafana/prometheus/rbac-setup.yaml
kubectl create -f  k8s-prometheus-grafana/prometheus/configmap.yaml 
kubectl create -f  k8s-prometheus-grafana/prometheus/prometheus.deploy.yml 
kubectl create -f  k8s-prometheus-grafana/prometheus/prometheus.svc.yml 
#安裝 grafana 組件
kubectl create -f   k8s-prometheus-grafana/grafana/grafana-deploy.yaml
kubectl create -f   k8s-prometheus-grafana/grafana/grafana-svc.yaml
kubectl create -f   k8s-prometheus-grafana/grafana/grafana-ing.yaml

 

查看組件服務的映射端口
查看 k8s 服務
訪問
1、prometheus http://ip:30003  2、grafana http://ip:31112 (默認用戶密碼 admin admin)
3、配置grafana 數據源為prometheus
配置數據源
4、導入dashboard面板
導入監控模板

配置模板數據源
查看grafana 監控圖標
dashboard

 
 

參考:http://www.pianshen.com/article/5359214306/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM