k8s安裝Prometheus+Grafana


k8s集群略過,之前有發布過k8s高可用集群博客,可以訪問連接
https://www.cnblogs.com/lfl17718347843/p/13417304.html

1.克隆github項目

https://gitee.com/liugpwwwroot/k8s-prometheus-grafana.git

2.安裝node-exporter

kubectl apply -f node-exporter.yaml

3.安裝prometheus組件

kubectl apply -f  k8s-prometheus-grafana/prometheus/rbac-setup.yaml
kubectl apply -f  k8s-prometheus-grafana/prometheus/configmap.yaml 
kubectl apply -f  k8s-prometheus-grafana/prometheus/prometheus.deploy.yml 
kubectl apply -f  k8s-prometheus-grafana/prometheus/prometheus.svc.yml

4.安裝 grafana 組件

kubectl apply -f k8s-prometheus-grafana/grafana/grafana-deploy.yaml
kubectl apply -f k8s-prometheus-grafana/grafana/grafana-svc.yaml
kubectl apply -f k8s-prometheus-grafana/grafana/grafana-ing.yaml

5.查看組件服務的映射端口

kubectl get svc -n kube-system

6.訪問Prometheus ip+port

7.訪問node-exporter ip+port

8.訪問grafana並添加數據源 ip+port

9.導入模板


免責聲明!

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



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