- kubectl get cm - kubectl edit cm prometheus-server ---add therse line:- scrape_configs: - job_name: my-application static_configs: - targets: # to confirm the changes:- - kubectl get cm file_name -o yaml
- 192.168.58.2:XXXX Note: - this is your pod id where application is running
8.expose the prometheus clusterIp at the nodeport
- kubectl expose service prometheus-server --type=NodePort --target-port=9090 – name=prometheus-server-ext
9. find prometheus ip - minikube service prometheus-server-ext - XXX.XX.XX.X:xxxxx
10 give target ip to grafana to take metrix by pass minikube of prometheus .