Skip to content

This repo helps you with the installion of monitoring,logging,alerting and troubleshooting stack for your k8s cluster

Notifications You must be signed in to change notification settings

Supriyo-Roy/k8s-monitoring-troubleshooting-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Instruction on how to install prometheus grafana loki

Start your local kubernetes cluster

minikube start --driver=virtualbox

start-k8-cluster

Create 2 namespaces for prometheus & loki

kubectl create ns <name-of-namespace>

check your helm repo

helm repo list

helm-repo-list

or you can also add

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana-loki https://grafana.github.io/helm-charts

update your helm repo

helm repo update

Search your helm repo

helm search repo prometheus-community

Install the kube-prometheus-stack and loki

helm install prometheus prometheus-community/kube-prometheus-stack -n prometheus
helm install loki grafana/loki-stack -n loki

As a part of you stack you get grafana as well as Alertmanager, wait till all the pods are in running state

kubectl get po -n prometheus
kubectl get po -n loki

now expose your services to view the gui

kubectl -n prometheus expose service prometheus-kube-prometheus-prometheus --type=NodePort --target-port=9090 --name prometheus-svc-ext

kubectl -n prometheus expose service prometheus-kube-prometheus-alertmanager --type=NodePort --target-port=9093 --name=alertmanager-svc-ext

kubectl -n prometheus expose service prometheus-grafana --type=NodePort --target-port=3000 --name=grafana-svc-ext

kubectl -n loki expose service loki --type=NodePort --target-port=3100 --name=loki-svc-ext

prometheus-grafana-integration

Grafana Dashboard after adding data sources

grafana-dashboard-id(9873)

create a deployment to check if we are getting logs for the containers

kubectl create deployment nginx-deployment --image=nginx --replicas=4

After nginx deployment we can see loki logs

loki-logs loki-logs-nginx

Configure slack to receive notification

https://api.slack.com/ --> yor apps --> create new app --> From Scratch --> after creating --> incoming weebhooks--> Add new webhook to workspace

Upgrade the helm chart to receieve alerts

helm upgrade --reuse-values -f /home/supriyo/alertmanager-config.yaml prometheus prometheus-community/kube-prometheus-stack -n prometheus

slack-notification

Go to Komodor UI and install the helm mentioned or generated when adding cluster

komodor

About

This repo helps you with the installion of monitoring,logging,alerting and troubleshooting stack for your k8s cluster

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published