This repository contains a set of Spring Boot microservices deployed on Kubernetes using Helm. Nginx Ingress is used as the API gateway for routing and security redirection.
- Handles authentication and authorization using JWT tokens.
- Provides endpoints for health checks and authentication validation.
- See
security-service/README.mdfor details on endpoints, Docker, Helm, and configuration.
- Manages customer orders and exposes REST endpoints for order management and health checks.
- Authentication is enforced by Nginx Ingress, which calls the security-service for JWT validation (see
order-service/helm/values.yaml). - See
order-service/README.mdfor endpoints, Docker, Helm, and authentication flow.
- Provides the Nginx Ingress controller setup for the cluster.
- If a service for the ingress controller is not present, create it using the manifest in
nginx-service/service.yaml. - See
nginx-service/README.mdfor instructions on exposing Nginx Ingress in Kubernetes.
-
Clone the repository:
git clone <your-repo-url> cd spring-boot-kubernetes
-
Build and package services:
cd security-service && ./mvnw clean package cd ../order-service && ./mvnw clean package
-
Build Docker images:
docker build -t <your-dockerhub-username>/security-service:latest ./security-service docker build -t <your-dockerhub-username>/order-service:latest ./order-service
-
Deploy to Kubernetes with Helm:
helm upgrade --install security-service ./security-service/helm --namespace myspace --create-namespace helm upgrade --install order-service ./order-service/helm --namespace myspace --create-namespace
-
Set up Nginx Ingress (if not present):
- Apply the service manifest:
kubectl apply -f nginx-service/service.yaml
- Apply the service manifest:
- Kubernetes & Helm Command Reference
- Each service contains its own
README.mdandhelp.mdfor setup and usage details. - Official docs:
For more advanced usage, troubleshooting, and developer setup, see the help.md files in each service directory and the command reference in documentation/Comands.md.