A Spring Boot TaskManager application deployed on Kubernetes with PostgreSQL, Docker, Prometheus, and Grafana monitoring.
- User registration and login with JWT authentication
- Project management
- Kanban task board with To Do, In Progress, and Done columns
- Project members
- Task assignment
- Due dates
- Task comments
- Prometheus metrics exposed by Spring Boot Actuator
- Grafana dashboard provisioned through the kube-prometheus-stack sidecar
- Java 21
- Spring Boot
- Spring Security and JWT
- PostgreSQL
- Docker
- Kubernetes and Minikube
- Helm
- kube-prometheus-stack
- Prometheus
- Grafana
backend/ Spring Boot application
docker/ Dockerfile and Docker Compose config
k8s/ Kubernetes manifests
k8s/monitoring/ Prometheus ServiceMonitor and Grafana dashboard
.github/workflows/ GitHub Actions CI/CD workflow
docker compose -f docker/docker-compose.yml up --buildOpen:
http://localhost:8080
Start Minikube:
minikube startBuild the app image inside Minikube:
minikube image build -t taskmanager:latest -f docker/Dockerfile .Create Kubernetes secrets:
kubectl create secret generic db-secret \
--from-literal=username=postgres \
--from-literal=password=postgres
kubectl create secret generic jwt-secret \
--from-literal=secret="$(openssl rand -base64 64)"Apply the manifests:
kubectl apply -f k8s/postgres-pvc.yaml
kubectl apply -f k8s/postgres-deployment.yaml
kubectl apply -f k8s/postgres-service.yaml
kubectl apply -f k8s/app-deployment.yaml
kubectl apply -f k8s/app-service.yamlOpen the app:
kubectl -n default port-forward svc/taskmanager-app 8080:8080Then visit:
http://localhost:8080/projects
Install kube-prometheus-stack:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
helm upgrade --install monitoring prometheus-community/kube-prometheus-stack \
-n monitoring \
--create-namespace \
-f k8s/monitoring/values.yamlApply the TaskManager monitoring resources:
kubectl apply -f k8s/monitoring/taskmanager-service-monitor.yaml
kubectl apply -f k8s/monitoring/taskmanager-dashboard.yamlOpen Grafana:
kubectl -n monitoring port-forward svc/monitoring-grafana 3000:80Then visit:
http://localhost:3000/d/taskmanager-app/taskmanager-app
Default local login:
admin / admin
After Minikube is already installed and the stack is deployed:
minikube start
kubectl -n default port-forward svc/taskmanager-app 8080:8080
kubectl -n monitoring port-forward svc/monitoring-grafana 3000:80App:
http://localhost:8080/projects
Grafana:
http://localhost:3000/d/taskmanager-app/taskmanager-app
If port 8080 shows an old Docker container, stop it:
docker stop taskmanager-appThe GitHub Actions workflow at .github/workflows/ci-cd.yml builds and tests the Spring Boot app.
On pushes to main, it also publishes the Docker image to GitHub Container Registry and uploads Kubernetes manifests patched with the pushed image tag.