Kube Prometheus monitoring
Install the kube-prometheus-stack with Helm to expose Prometheus and Grafana on your Kubernetes cluster via NodePorts.
Less than 1 minute(139 words)complex
Quick Navigation
Difficulty: Intermediate
Estimated Time: 15-25 minutes
Prerequisites: Running Kubernetes cluster, Helm installed, kubectl configured, Basic monitoring concepts
Add the Prometheus community Helm repository and update it:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
Create a custom-values.yaml file to customize the Helm chart installation. This file will configure Prometheus and Grafana to be exposed via NodePorts.
# custom-values.yaml
prometheus:
service:
type: NodePort
grafana:
service:
type: NodePort
Then, install the kube-prometheus-stack using Helm:
helm upgrade --install kube-prometheus-stack prometheus-community/kube-prometheus-stack -f custom-values.yaml
kubectl --namespace default get pods -l "release=kube-prometheus-stack"
http://142.44.40.95:30642/login
http://142.44.40.95:30090/graph
Username:
$ kubectl get secret --namespace default kube-prometheus-stack-grafana -o jsonpath="{.data.admin-user}" | base64 --decode ; echo
admin
Password:
$ kubectl get secret --namespace default kube-prometheus-stack-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
prom-operator