Created
July 18, 2025 12:59
-
-
Save Monarene/e35f4379abffa503fa5cc6fb41f9ddc4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup application | |
git clone https://github.com/rslim087a/application-monitoring-prometheus | |
cd application-monitoring-prometheus | |
kubectl apply -f . | |
# Access the fast API | |
kubectl port-forward svc/fastapi-app -n monitoring 8000:8000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a new namespace named 'test' for kube-prometheus-stack installation | |
kubectl create namespace test | |
# Get Helm Repository Info | |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts | |
helm repo update | |
# Install Helm Chart setting "grafana.adminPassword=?" | |
helm upgrade --install prom-stack prometheus-community/kube-prometheus-stack --namespace test --set grafana.adminPassword="mkanusm_123*" | |
# Get all resources | |
kubectl get all -n test | |
# Port-forward commands for kube-prometheus-stack services | |
# Alertmanager | |
kubectl port-forward service/alertmanager-operated 9093:9093 -n test & | |
# Grafana | |
kubectl port-forward service/prom-stack-grafana 3000:80 -n test & | |
# Prometheus Alertmanager | |
kubectl port-forward service/prom-stack-kube-prometheus-alertmanager 9093:9093 -n test & | |
# Prometheus Operator | |
kubectl port-forward service/prom-stack-kube-prometheus-operator 443:443 -n test & | |
# Prometheus | |
kubectl port-forward service/prom-stack-kube-prometheus-prometheus 9090:9090 -n test & | |
# kube-state-metrics | |
kubectl port-forward service/prom-stack-kube-state-metrics 8080:8080 -n test & | |
# Prometheus Node Exporter | |
kubectl port-forward service/prom-stack-prometheus-node-exporter 9100:9100 -n test & | |
# Prometheus Operated | |
kubectl port-forward service/prometheus-operated 9090:9090 -n test & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment