Kubernetes
You can find the code from charlie6679/k8s-prometheus
create a namespace "monitoring"
create node-exporter daemonset
create node-exporter service
Now you can visit <node_ip>:9100 to check.
create ServiceAccount
create kube-state-metrics deployment
create kube-state-metrics service
create ServiceAccount
create configmap
create Prometheus Server Deployment
create Prometheus Server Service
check the Node_Port
Now can visit <Node_IP>:<Node_Port> to see Prometheus.
create Grafana Server Deployment
create Grafana Server Service
check the Nose_Port
Now can visit <Node_IP>:<Node_Port> to see Grafana.
Create Grafana Service Ingress
get the ingress IP
set the addreee to the host /etc/hosts chek the 80 port mapping to which port
use <host_name><Node_port> to visit grafana
Click configuration -> data sources.
Search prometheus and select.
Type the "http://<master ip>:<prometheus service mapping port>" on URL than click "Save & Test".
Click Create -> dashboard to add panel.
In query you can choose the data.
Or you can go google "Grafana dashboard" to fin the ID.
Click Create -> import to import the dashboard.
https://github.com/xingao0803/Prometheus
https://www.servicemesher.com/blog/prometheus-monitor-k8s-2/
https://kubernetes.github.io/ingress-nginx/deploy/#bare-metal