Skip to content

code4mk/k8s-easy-prometheus-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6321242 Β· Jun 6, 2024

History

5 Commits
Jun 6, 2024
Jun 2, 2024
Jun 2, 2024
Jun 2, 2024

Repository files navigation

πŸš€ Setup Prometheus (kube-prometheus-stack) on Kubernetes

Easily set up Prometheus (kube-prometheus-stack) on Kubernetes and configure Prometheus, Grafana, and Alertmanager.

πŸ”§ Manual Process

πŸ“₯ Add Helm Repo

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

🏷️ Create Namespace

kubectl create namespace monitoring

πŸ”‘ Add Grafana Secrets (Alert Credentials: Email, Slack, etc.)

kubectl apply -f grafana-secret.yml

πŸ” Base64 Generate

echo -n 'the_data' | base64

πŸ› οΈ Configuration

You can modify the config data inside the config folder.

helm uninstall prometheus -n monitoring

Automate Process with bash script

./setup-prometheus.sh

πŸ“ˆ Install Prometheus

helm install prometheus prometheus-community/kube-prometheus-stack -n monitoring -f config/grafana.yml -f config/prometheus.yml -f config/alert-manager.yml

⬆️ Upgrade

helm upgrade prometheus prometheus-community/kube-prometheus-stack -n monitoring -f config/grafana.yml -f config/prometheus.yml -f config/alert-manager.yml

❌ Uninstall

helm uninstall prometheus -n monitoring

πŸ€– Automate Process with Bash Script

./setup-prometheus.sh

Releases

No releases published

Packages

No packages published

Languages