- Java Development Kit (JDK) 17 or higher
- Maven
- Docker
- Kubernetes cluster (Rancher Desktop or Minikube)
- Helm
- PostgreSQL database
Install PostgreSQL in Kubernetes using Helm charts
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm install postgresql bitnami/postgresql
Navigate to the project directory and run:
mvn clean install
mvn spring-boot:run
Open your browser and navigate to http://localhost:8000/users.
Run the following command to build the Docker image:
docker build -t demo .
Run the Docker container to test the image:
docker run -p 8000:8000 demo
helm install demo deployment/demo
I have pushed a working docker image at https://hub.docker.com/r/amanwork6/demo