#安裝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
查看組件服務的映射端口
訪問
一、prometheus http://ip:30003 二、grafana http://ip:31112 (默認用戶密碼 admin admin)
三、配置grafana 數據源爲prometheus
四、導入dashboard面板
node
查看grafana 監控圖標
git
參考:http://www.pianshen.com/article/5359214306/github