From 91b1610ebe393071ebf876683d7127b13186ad4f Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sat, 22 Apr 2023 14:19:05 +0200 Subject: [PATCH] chore: imported example from the private kb --- .../prometheus on k8s using helm.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 examples/kubernetes/prometheus on k8s using helm.md diff --git a/examples/kubernetes/prometheus on k8s using helm.md b/examples/kubernetes/prometheus on k8s using helm.md new file mode 100644 index 0000000..bd77fe8 --- /dev/null +++ b/examples/kubernetes/prometheus on k8s using helm.md @@ -0,0 +1,54 @@ +# Prometheus on Kubernetes using Helm + +Installation: + +```sh +helm upgrade --install --namespace monitoring --create-namespace prometheus prometheus-community/prometheus +``` + +The server can be accessed via port 80 on `prometheus-server.monitoring.svc.cluster.local` from within the cluster. + +Get the server URL: + +```sh +export POD_NAME=$(kubectl get pods --namespace monitoring -l "app=prometheus,component=server" -o jsonpath="{.items[0].metadata.name}") +kubectl --namespace monitoring port-forward $POD_NAME 9090 +``` + +Alertmanager can be accessed via port 80 on `prometheus-alertmanager.monitoring.svc.cluster.local` from within the cluster + +Get Alertmanager's URL: + +```sh +export POD_NAME=$(kubectl get pods --namespace monitoring -l "app=prometheus,component=alertmanager" -o jsonpath="{.items[0].metadata.name}") +kubectl --namespace monitoring port-forward $POD_NAME 9093 +``` + +PushGateway can be accessed via port 9091 on `prometheus-pushgateway.monitoring.svc.cluster.local` from within the cluster + +Get PushGateway's URL: + +```sh +export POD_NAME=$(kubectl get pods --namespace monitoring -l "app=prometheus,component=pushgateway" -o jsonpath="{.items[0].metadata.name}") +``` + +## Further readings + +- [Install Prometheus and Grafana with helm 3 on a local machine VM] +- [Set up prometheus and ingress on kubernetes] + +## Sources + +All the references in the [further readings] section, plus the following: + +- [Helm chart] + + +[helm chart]: https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus + + +[further readings]: #further-readings + + +[install prometheus and grafana with helm 3 on a local machine vm]: https://dev.to/ko_kamlesh/install-prometheus-grafana-with-helm-3-on-local-machine-vm-1kgj +[set up prometheus and ingress on kubernetes]: https://blog.gojekengineering.com/diy-how-to-set-up-prometheus-and-ingress-on-kubernetes-d395248e2ba