Right now I got an architecture like this:
internet
|
[ IngressController ]
| |
[ Ingress A] [ Ingress B]
--|-----|-- --|-----|--
[ Service A] [ Service B]
| |
[ Pod A] [ Pod B]
So if Service A request data from Service B it is using the full qualified name, e.g.
ResponseEntity<Object> response = restTemplate.exchange(host.com/serviceB, HttpMethod.POST, entity, Object.class);
As all of them are in the same cluster I would try to change the architecture to improve communication between the services. I imagined something like this:
internet
|
[ IngressController ]
| |
[ Ingress A] [ Ingress B]
--|-----|-- --|-----|--
[ Service A]-[ Service B]
| |
[ Pod A] [ Pod B]
So the services would be allowed to request each other via the name only or something. I am just not sure how to realize this using REST-Services.