* Migrate Structure * Insert explicit ids for headers * Remove unnecessary asciidoc attributes * Copy default antora files * Fix indentation for all pages * Split files * Generate a default navigation * Remove includes * Fix cross references * Enable Section Summary TOC for small pages * Antora migration
14 lines
1.0 KiB
Plaintext
14 lines
1.0 KiB
Plaintext
[[kubernetes-native-service-discovery]]
|
|
= Kubernetes native service discovery
|
|
:page-section-summary-toc: 1
|
|
|
|
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, such as Istio (https://istio.io), a service mesh that is capable of load balancing, circuit breaker, failover, and much more.
|
|
|
|
The caller service then need only refer to names resolvable in a particular Kubernetes cluster. A simple implementation might use a spring `RestTemplate` that refers to a fully qualified domain name (FQDN), such as `https://\{service-name}.\{namespace}.svc.\{cluster}.local:\{service-port}`.
|
|
|
|
Additionally, you can use Hystrix for:
|
|
|
|
* Circuit breaker implementation on the caller side, by annotating the spring boot application class with `@EnableCircuitBreaker`
|
|
* Fallback functionality, by annotating the respective method with `@HystrixCommand(fallbackMethod=`
|