This is a Kubernetes version of reco-model-monitoring project. FastAPI, Grafana & Prometheus run on Kubernetes.
There is only one prerequisites:
git clone https://github.com/silverstone1903/reco-app-k8s
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
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
kubectl delete -f manifests/.
kubectl delete ns monitoring
- FastAPI: http://localhost:8000
- Prometheus: http://localhost:9090
- Grafana: http://localhost:3000