Helm/Prometheus: Difference between revisions
Jump to navigation
Jump to search
Line 112: | Line 112: | ||
| valign="top" | | | valign="top" | | ||
* [https://spacelift.io/blog/prometheus-helm-chart Prometheus » Spacelift » Blog] | * [https://spacelift.io/blog/prometheus-helm-chart Prometheus » Spacelift » Blog] | ||
* [https://prometheus.io/docs/instrumenting/clientlibs/ Prometheus » Client Libraries] | |||
* [https://grafana.com/grafana/dashboards/315-kubernetes-cluster-monitoring-via-prometheus/ Prometheus » K8s » Grafana] | * [https://grafana.com/grafana/dashboards/315-kubernetes-cluster-monitoring-via-prometheus/ Prometheus » K8s » Grafana] | ||
* [https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/ Prometheus » Alerting Rules] | |||
* [https://prometheus.io/docs/prometheus/latest/configuration/configuration/ Prometheus » Configuration] | |||
* [https://prometheus.io/docs/concepts/data_model/ Prometheus » Data Model] | |||
* [https://prometheus.io/docs/visualization/grafana/ Prometheus » Grafana] | |||
* [https://prometheus.io/docs/prometheus/latest/querying/basics/ Prometheus » Quering] | |||
* [https://prometheus.io/docs/prometheus/latest/storage/ Prometheus » Storage] | |||
* [https://prometheus.io/ Prometheus] | * [https://prometheus.io/ Prometheus] | ||
Revision as of 22:53, 1 July 2024
helm repo add prometheus https://prometheus-community.github.io/helm-charts helm repo update helm repo list
Config
export KUBECONFIG="${HOME}/.kube/dev-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/gcp-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/config"
Install
kubectl create namespace prometheus
helm show values prometheus/prometheus
cat <<YML | helm install -n prometheus prometheus prometheus/prometheus -f -
ingress:
enabled: true
hosts:
- prometheus.k8s.local
YML
Uninstall
helm uninstall -n prometheus prometheus
helm delete -n prometheus prometheus
Playground
helm upgrade --install -f values.yaml prometheus prometheus/prometheus
helm upgrade --install prometheus prometheus/prometheus
helm show values prometheus/prometheus
|
kubectl exec -n prometheus -it prometheus-6fd8886fd4-4vwgh -- cat /etc/os-release
kubectl exec -n prometheus -it prometheus-6fd8886fd4-4vwgh -- bash
kubectl exec -n prometheus -it prometheus-6fd8886fd4-4vwgh -- sh
|
| |
kubectl delete all --all -n prometheus
kubectl delete ing --all -n prometheus
kubectl delete sts --all -n prometheus
|
kubectl delete svc --all -n prometheus
kubectl delete pvc --all -n prometheus
kubectl delete pv --all -n prometheus
|
| |
kubectl logs -f prometheus-6fd8886fd4-4vwgh -n prometheus
kubectl rollout restart deploy prometheus -n prometheus
kubectl rollout restart sts prometheus -n prometheus
kubectl logs -f prometheus-hash -n prometheus
|
kubectl config --kubeconfig=${HOME}/.kube/aws-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/dev-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/gcp-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/config view --flatten
|
| |
kubectl get secret -n prometheus prometheus -o json|jq -r '.data."admin-password"'|base64 -d;echo
kubectl get secret -n prometheus prometheus -o json|jq -r '.data."admin-user"'|base64 -d;echo
|
References
| ||
| ||