-
Helm Chart : Package installer for kubernetes
-
Prometheus: Open-source monitoring and alerting toolkit ( A Prometheus deployment needs dedicated storage space to store scraping data)
-
Grafana : visualization, and observability in Prometheus
minikube start # minikube start --memory='12g' --cpus='4' -n 3
kubectl config view | grep namespace #get current namespace
kubectl cluster-info
minikube addons list
# Extra
minikube addons enable csi-hostpath-driver
# Enable dedicated storage space to store scraping data
kubectl patch storageclass csi-hostpath-sc -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
kubectl patch storageclass standard -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
Install helm - https://helm.sh/docs/intro/install/
kubectl get ns
kubectl create namespace monitoring
kubectl get deployments --namespace=monitoring
kubectl get pods --namespace=monitoring
kubectl get configmap -n monitoring
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo list
helm repo update
helm install prometheus prometheus-community/prometheus --namespace monitoring
kubectl get pods -n monitoring
kubectl expose service prometheus-server --namespace monitoring --type=NodePort --target-port=9090 --name=prometheus-server-ext
minikube ip
kubectl get svc -n monitoring
#Prometheus Server UI = minikubeIP + 30333 [prometheus-server-ext port] eg : 192.168.49.2:30333
helm repo add grafana https://grafana.github.io/helm-charts
helm install grafana grafana/grafana --namespace monitoring
#run the command in the display to get password -SCaxM0KE4GRzxxxx
kubectl expose service grafana --namespace monitoring --type=NodePort --target-port=3000 --name=grafana-ext
kubectl get svc -n monitoring
#Grafana UI = minikubeIP + 32084 [grafana-ext ]
kubectl get svc -n monitoring #copy PORT
Open URL Grafana = minikubeIP + 32084 [grafana-ext port]
usn = admin , password from output command during installation
Home > Add first Datasource > prometheus >Add URL = http://prometheusURL >save and test
Home > Dashboard > New > Import > Enter 3662 >Load