docs: native kubernetes service discovery (#300)

This commit is contained in:
Peter Butkovic
2018-12-18 22:27:49 +01:00
committed by Ryan Baxter
parent 135bf6f8eb
commit 9a7be93cac
3 changed files with 18 additions and 1 deletions

6
.gitignore vendored
View File

@@ -73,4 +73,8 @@ com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
# vscode + eclipse
.settings/
.project
.classpath
.factorypath

View File

@@ -0,0 +1,11 @@
== Kubernetes native service discovery
Kubernetes itself is capable of (server side) service discovery (see: https://kubernetes.io/docs/concepts/services-networking/service/#discovering-services).
Using native kubernetes service discovery ensures compatibility with additional tooling, like: istio https://istio.io (service mesh, capable of load balancing, ribbon, circuit breaker, failover and much more).
The caller service just needs to refer to names resolvable in particular kubernetes cluster then. Simplest implementation might use the spring `RestTemplate` referring to fully qualified domain name (FQDN) `http://<service-name>.<namespace>.svc.<cluster>.local:<service-port>`.
Additionally, hystrix can be used for:
* circuit breaker implementation on the caller side, just by annotating the spring boot application class: `@EnableCircuitBreaker`
* and for the fallback functionality, annotating the respective method via: `@HystrixCommand(fallbackMethod=` does the job.

View File

@@ -7,6 +7,8 @@ The main objective of the projects provided in this repository is to facilitate
include::discovery-client.adoc[]
include::discovery-kubernetes-native.adoc[]
include::property-source-config.adoc[]
include::ribbon-integration.adoc[]