'Why does Spring Cloud Kubernetes needs to access the K8s API
I am migrating Spring Boot services to Kubernetes and making use of Feign and Spring Cloud Kubernetes.
The k8s library needs a serviceaccount in order to query the Kubernetes API and I am asking myself why that is. If you run your applications in the same namespace, then Kubernetes itself resolves the name automatically. Why does Spring needs to query the API in order to resolve pods/services?
I could imagine that the spring cloud library resolves the pods for a given service and applies a client-based loadbalacing while I actually do not see a reason why that provides any benefits. Kubernetes itself could balance via the ingress.
Looking forward to get some insights on how that system runs under the hood.
FYI: For local development we disable kubernetes SD and switch to consul, which is easier to maintain on the developers machine.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
