Prometheus
Let's see how to run Prometheus (code) in a Kubernetes cluster.
Configuration
We'll use the community Helm chart (code):
Deployment
bash
# adds Helm chart repository
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
# installs
helm upgrade --install prometheus prometheus-community/prometheus --namespace prometheus --create-namespace
# checks everything is ok
kubectl get pod -n prometheus
# uninstalls
helm uninstall prometheus -n prometheus
kubectl delete ns prometheusExamples
Minimal installation with default parameters
Install the application:
bash
helm upgrade --install prometheus prometheus-community/prometheus --namespace prometheus --create-namespaceForward the service port for local access:
bash
kubectl port-forward service/prometheus-server 9090:80 -n prometheusOpen in a browser localhost:9090