0

How to use openshift's service Registry inside a Spring Boot application?

In the openshift's documentation about Service Registry, it says that:

Ribbon can be declaratively configured to use OpenShift instead of a service registry, without any code changes.

How can I configure Ribbon to use Openshift's service registry?

g00glen00b
  • 41,995
  • 13
  • 95
  • 133
Federico Ponzi
  • 2,682
  • 4
  • 34
  • 60
  • Not sure exactly what technique you are thinking of, can you provide more details? A little bit of information about using DNS SRV records can be found in http://cookbook.openshift.org/services-networking-and-routing/how-can-i-discover-running-pods-using-dns-srv-records.html – Graham Dumpleton Jun 19 '18 at 00:07
  • @GrahamDumpleton Sorry, forgot to answer you! I'm going to update my answer. – Federico Ponzi Jun 22 '18 at 13:06
  • No idea what those docs are suggesting. There is a REST API in OpenShift where can query about state of configuration, including finding out what pods are registered against a service. Maybe it is using that, don't know. For that to work at least, you need to grant the application access to the REST APU. Some information in http://cookbook.openshift.org/users-and-role-based-access-control/how-do-i-enable-rest-api-access-for-an-application.html But you probably still configure the application to enable it to do it. – Graham Dumpleton Jun 23 '18 at 04:03

0 Answers0