-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathhelm_Prometheus
57 lines (41 loc) · 2.7 KB
/
helm_Prometheus
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Helm
https://helm.sh/
Prometheus
https://prometheus.io/download/
Helm Charts for Prometheus
https://artifacthub.io/packages/helm/prometheus-community/prometheus
Port-Fordwarding OR ClusterIP --> LoadBalancer
Helm Charts for Grafana
https://artifacthub.io/packages/helm/grafana/grafana
Get Crentials
kubectl get secret --namespace default my-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
Port-Forwarding OR ClusterIP --> LoadBalancer
Add the Prometheus Data-Source
Grafana Dashboard
https://grafana.com/grafana/dashboards/315-kubernetes-cluster-monitoring-via-prometheus/
315
6417
=============================================================================================================================
helm version
502 clear
503 helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
504 helm install my-prometheus prometheus-community/prometheus --version 20.0.2
505 helm repo update
506 helm install my-prometheus prometheus-community/prometheus --version 20.0.2
507 kubectl get all
508 history
509 gcloud container clusters get-credentials cluster-demo3 --zone us-central1-a --project kubernetes-project-371605 && echo "# When the next line says 'Forwarding from...', go to: https://ssh.cloud.google.com/devshell/proxy?port=8080" && kubectl port-forward $(kubectl get pod --selector="app=prometheus,component=server,release=my-prometheus" --output jsonpath='{.items[0].metadata.name}') 8080:9090
510 helm repo add grafana https://grafana.github.io/helm-charts
511 helm install my-grafana grafana/grafana --version 6.52.4
512 kubectl get all
513 gcloud container clusters get-credentials cluster-demo3 --zone us-central1-a --project kubernetes-project-371605 && kubectl port-forward $(kubectl get pod --selector="app.kubernetes.io/instance=my-grafana,app.kubernetes.io/name=grafana" --output jsonpath='{.items[0].metadata.name}') 8080:3000
514 kubectl get cm
515 kubectl describe cm my-grafana
516 kubectl get secret
517 kubectl describe secret my-grafana
519 kubectl get secret --namespace default my-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
520 gcloud container clusters get-credentials cluster-demo3 --zone us-central1-a --project kubernetes-project-371605 && kubectl port-forward $(kubectl get pod --selector="app.kubernetes.io/instance=my-grafana,app.kubernetes.io/name=grafana" --output jsonpath='{.items[0].metadata.name}') 8080:3000
521 kubectl get secret --namespace default my-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
522 helm delete my-grafana grafana/grafana
523 helm delete my-prometheus prometheus-community/prometheus
524 helm delete my-prometheus