I have two simple Springboot microservice which connect with each other using Spring Eureka.
Steps -
- First I run Eureka server.
- Then I run both the microservices.
- So both microservices register & discovery from Eureka server.
I want to achieve the same in Openshift v3. I know Openshift uses Kubernates Service for achieving load-balancing & pod-discovery. But can I use Eureka server in Openshift?
In Openshift I have 3 pods..
- 1 pod for eureka and 2 pods for microservices.
- Both microservices register with eureka.
But in Eureka, it is registering as microservice's pod IP:PORT.
So when discovering the microservice tries to make the call to POD IP & fails.
Generally, to access POD IP we need to invoke service layer in Openshift. So how can I make eureka server register server layer IP:PORT instead of POD's IP:PORT