Prometheus/Grafana from Helm charts to monitor K8s cluster
Prometheus/Grafana from Helm charts to monitor K8s cluster:
This guide asumes that you have a running K8s cluster and helm installed (We’ll be using helm’s charts)
Install from latest stable Helm chart:
helm install stable/grafana --name grafana-testing
I choose the helm release name “grafana-testing”
Install from latest stable Helm chart:
helm install stable/prometheus --name prometheus-testing
I choose the helm release name “prometheus-testing”
Check your helm releases:
helm ls
I access both GUIs by creating a simple NodePort K8s Service (I’m testing, I don’t need/want an ELB and the costs that implies):
Exposing Prometheus via NodePort:
kubectl -f https://raw.githubusercontent.com/pulpbill/Prometheus/master/prometheus-service.yaml apply
Exposing Grafana via NodePort:
kubectl -f https://raw.githubusercontent.com/pulpbill/Prometheus/master/grafana-service.yaml apply
Check your deployed Kubernetes services (I use default namespace):
kubectl get svc -n default
Allow your IP at the security group of your K8s node so you can access that node IP at the port you’ve just created: Grafana -> yourec2ip:30003 and Prometheus -> yourec2ip:30000
Time to use the output I mentioned before:
kubectl get secret --namespace default grafana-testing -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
Once logged in at Grafana:
kubectl describe svc prometheus-testing-server | grep Endpoints
Now, let’s add a Dashboard
You can always create your own Grafana Dashboards or customize an existing one.
While picking a Grafana Dashboard, check for “Dependencies:” at the right. Let’s say one it’s build for InfluxDB stats, that won’t work for this case.
Recommended Dashboards: 3119 - 315 - 6663 - 1621