https://github.com/tmvolpato/microservices-spring-k8s-gateway
microservices with k8s and Spring Gateway
https://github.com/tmvolpato/microservices-spring-k8s-gateway
docker-builder docker-compose flyway hateoas hooks java11 kubernetes open-api-v3 pmd postgresql spring-boot spring-gateway spring-jpa spring-kubernetes spring-specifications test-container test-integration unit-test
Last synced: 2 months ago
JSON representation
microservices with k8s and Spring Gateway
- Host: GitHub
- URL: https://github.com/tmvolpato/microservices-spring-k8s-gateway
- Owner: tmvolpato
- Created: 2023-05-27T15:37:24.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-24T13:34:39.000Z (almost 2 years ago)
- Last Synced: 2025-01-22T20:51:49.023Z (4 months ago)
- Topics: docker-builder, docker-compose, flyway, hateoas, hooks, java11, kubernetes, open-api-v3, pmd, postgresql, spring-boot, spring-gateway, spring-jpa, spring-kubernetes, spring-specifications, test-container, test-integration, unit-test
- Language: Java
- Homepage:
- Size: 108 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# microservices-spring-k8s-gateway
| Type | Name | Description | Status |
|--- |--- |--- |--- |
| Lib | lib-common-exception | Handles all exceptions for the services it imports | Finished |
| Service | Microservice-gateway | Service that forwards incoming requests to the appropriate destination | TODO |
| Service | Microservice-user| Service to manage users | Finished |
| Service | Microservice-course | Service to manage courses | TODO |
## Technologies used in microservices
| Tecnology | Version | Site |
|--- |--- |--- |
| Java Openjdk | 11 | [https://openjdk.org/](https://openjdk.org/) |
| Spring Boot | 2.7.3 | [https://spring.io/projects/spring-boot](https://spring.io/projects/spring-boot) |
| Spring Cloud | 2021.0.3| [https://spring.io/projects/spring-cloud](https://spring.io/projects/spring-cloud)|
| Spring Cloud Kubernetes| 2.1.3|[https://spring.io/projects/spring-cloud-kubernetes](https://spring.io/projects/spring-cloud-kubernetes)|
| Spring Webflux | 2.7.3 | [https://docs.spring.io/spring-boot/docs/2.1.x/reference/html/boot-features-testing.html](https://docs.spring.io/spring-boot/docs/2.1.x/reference/html/boot-features-testing.html)|
| OpenApi 3| 1.6.11| [https://springdoc.org/](https://springdoc.org/)|
| Hateoas| 1.6.11| [https://docs.spring.io/spring-hateoas/docs/current/reference/html/](https://docs.spring.io/spring-hateoas/docs/current/reference/html/)|
| PosrgreSQL| 13 | [https://www.postgresql.org/](https://www.postgresql.org/)|
| Flyway| 9.18.0| [https://flywaydb.org/documentation/usage/plugins/springboot](https://flywaydb.org/documentation/usage/plugins/springboot)|
| Docker | - | [https://www.docker.com/](https://www.docker.com/)|
| Docker Compose| 3.x | [https://docs.docker.com/compose/](https://docs.docker.com/compose/)|
| Google Jib|3.3.0 | [https://github.com/GoogleContainerTools/jib](https://github.com/GoogleContainerTools/jib)|
|Minikube |- |[https://minikube.sigs.k8s.io/docs/start/](https://minikube.sigs.k8s.io/docs/start/)|
## Install + start minikube
### Install minikube [https://minikube.sigs.k8s.io/docs/start/](https://minikube.sigs.k8s.io/docs/start/)
Start minikube
> $ minikube start --cpus 2 --memory 8192Show status minikube
> $ minikube statusStop minikube
> $ minikube stop
## Kubernetes - commands
Apply configuration file (deployment.yaml, service.yaml, secret.yaml, etc)
> $ kubectl apply -f deployment-name.yamlList (pod, service e deployment)
> $ kubectl get allList only pods
> $ kubectl get podList only services
> $ kubectl get servicesList only deployments
> $ kubectl get deploymentShow configmap
> $ kubectl describe configmaps [name-configmap]Delete deployment, service, secret, etc
> $ kubectl delete [deployment] [deployment-name]
Show url service
> $ minikube service [service-name] --urlInteractive pod - postgreSQL
> $ kubectl exec -it [pod-name] -- psql -h localhost -U admin --password -p 5432 postgres
## Create account Docker Hub
[https://hub.docker.com/](https://hub.docker.com/)## Google Container Tools jib - commands
Create package .jar
> $ mvn clean installSend image to docker hub (configured in pom.xml)
> $ mvn compile jib:build
## Start project local
to-do## Start project with k8s
to-do## Postman collections
to-do