Skip to content

fastapi + prometheus + grafana on Kubernetes 💣

Notifications You must be signed in to change notification settings

silverstone1903/reco-app-k8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

FastAPI




This is a Kubernetes version of reco-model-monitoring project. FastAPI, Grafana & Prometheus run on Kubernetes.



Installation

There is only one prerequisites:


git clone https://github.com/silverstone1903/reco-app-k8s

Usage

Start

First create a namespace called monitoring.

kubectl create namespace monitoring
kubectl apply -f manifests/.

Check pods, services and deployments

kubectl get pods -n monitoring --show-labels
kubectl get svc -n monitoring -o wide
kubectl get deployment -n monitoring -o wide

Scale a replicaset

kubectl scale --replicas 3 deployment reco-app -n monitoring

Logs

If you want to check pod logs with kubectl you can use logs.

kubectl logs --selector app=reco-app -n monitoring
kubectl logs --selector app=grafana -n monitoring
kubectl logs --selector app=prometheus-server -n monitoring

Stop & delete all resources

kubectl delete -f manifests/.
kubectl delete ns monitoring

URLs

Screenshots

API

Grafana