在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):ewolff/microservice-kubernetes开源软件地址(OpenSource Url):https://github.com/ewolff/microservice-kubernetes开源编程语言(OpenSource Language):Java 75.3%开源软件介绍(OpenSource Introduction):Microservice Kubernetes SampleDeutsche Anleitung zum Starten des Beispiels This sample is like the sample for my Microservices Book (English / German) that you can find at https://github.com/ewolff/microservice . However, this demo uses Kubernetes as Docker environment. Kubernetes also support service discovery and load balancing. An Apache httpd as a reverse proxy routes the calls to the services. This project creates a complete micro service demo system in Docker containers. The services are implemented in Java using Spring and Spring Cloud. It uses three microservices:
How to runSee How to run. Apache HTTP Load BalancerApache HTTP is used to provide the web page of the demo at port 8080. It also forwards HTTP requests to the microservices. This is not really necessary as each service has its own port on the Minikube host but it provides a single point of entry for the whole system. Apache HTTP is configured as a reverse proxy for this. Load balancing is left to Kubernetes. To configure this Apache HTTP needs to get all registered services from Kubernetes. It just uses DNS for that. Please refer to the subdirectory microservice-kubernetes-demo/apache to see how this works. Remarks on the CodeThe microservices are:
The microservices use REST to communicate to each other.
See e.g. CatalogClient .
The hostname is configurable to allow tests with stubs.
The default is The microservices have a Java main application in Note that the code has no dependencies on Kubernetes. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论