This project is an authentication system using Spring Security that enables user authentication through predefined static values.
Access the system at: http://localhost:8081/home/user
- JDK 11 or higher
- Maven for dependency management
- Minikube and kubectl for Kubernetes setup
First, clone the project from the repository:
git clone https://github.com/AminDenizer/Auth.git
Enter the following details in the application.properties
file:
server.port=8081
spring.security.user.name=Amin
spring.security.user.password=Denizer
Use the following command to run the project:
mvn spring-boot:run
The project will run on port 8081 and will be accessible via the link below: http://localhost:8081/home/user
To run the project using Docker, you can use the following image:
docker pull amindenizer/sample-test-auth:latest
docker run -p 8081:8081 amindenizer/sample-test-auth:latest
Follow these steps to deploy the project on a Kubernetes cluster using Minikube:
-
Start Minikube:
minikube start
-
Apply the deployment configuration:
kubectl apply -f authentication-service-deployment.yaml
-
Verify that the pods are running:
kubectl get pods
-
Check the service details:
kubectl describe svc authentication-service
-
Forward the service to access it locally:
kubectl port-forward svc/authentication-service 8081:80
The application will now be accessible at: http://localhost:8081/home/user