Before running K8 Mate, please ensure you have Prometheus and Grafana installed. Below gives you a simple breakdown of how to do this!
- On Linux run
sudo apt-get install helm
- On Windows run
choco install Kubernetes-helm
- On macOS run
brew install helm
- Run
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
- Update
helm repo update
Run helm install my-kube-prometheus-stack prometheus-community/kube-prometheus-stack
After this command, run kubectl get services
to view all your cluster services. The new services installed should be:
- alertmanager-operated
- my-kube-prometheus-stack-alertmanager
- my-kube-prometheus-stack-grafana
- my-kube-prometheus-stack-kube-state-metrics
- my-kube-prometheus-stack-operator
- my-kube-prometheus-stack-prometheus
- my-kube-prometheus-stack-prometheus-node-exporter
- prometheus-operated
- Run
kubectl expose service my-kube-prometheus-stack-prometheus --type=NodePort --target-port=9090 --name=prometheus-node-port-service
- Run
kubectl expose service my-kube-prometheus-stack-grafana --type=NodePort --target-port=3000 --name=grafana-node-port-service
- Forward the Grafana service to be accessible on
localhost:3000
by runningkubectl port-forward svc/grafana-node-port-service 3000:80
- Forward the Prometheus service to be accessible on
localhost:9090
by runningkubectl port-forward svc/prometheus-node-port-service 9090:9090
Prometheus and Grafana are all setup on your cluster now! Follow up in our original README to continue our app setup.