This project provides a quick demo of setting up Prometheus and Grafana for monitoring in a Minikube environment. It's designed to help you become familiar with Minikube, kubectl, Prometheus, and Grafana for monitoring and visualization.
- Install minikube.
- Clone this repository to your machine.
- Start the Minikube cluster by running
minikube start
. Refer to the minikube docs for more details. - Check the status of the cluster with
minikube status
. - To stop the cluster, use
minikube stop
. To start it again, runminikube start
.
- Create the monitoring namespace with
kubectl apply -f monitoring-namespace.yaml
. - Check the namespaces with
kubectl get namespaces
.
- Deploy Prometheus using the configuration from
prometheus-config.yaml
. - Create a Prometheus Pod with
prometheus-deployment.yaml
. - Expose Prometheus using a Kubernetes Service defined in
prometheus-service.yaml
. - Deploy Grafana using
grafana-deployment.yaml
and expose it withgrafana-service.yaml
.
- Access Prometheus at
http://prometheus:9090
. - Access Grafana using
minikube service --namespace=monitoring grafana
. Use the credentials: Username:admin
, Password:admin
.
This setup allows you to monitor your Minikube cluster and create custom dashboards for your metrics. When you're done, clean up by deleting the entire monitoring namespace with kubectl delete namespace monitoring
.