#安装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