0

I have an OKD 3.11 cluster up and running with the openshiftrouter configured. However now, I need to use the openshift haproxy router to add my own routes without essentially mapping the route to a service. for example, I need to add a route that redirects 'a.b.com' to IP address '1.2.3.4:443'. Here 1.2.3.4 is the IP address of another cluster's haproxy router.

I know we can do this with a non-openshift haproxy, I would like to use the openshift's haproxy router to achieve this too. I would like to know if there is a supported way in openshift to add routes that map hostnames to IP addresses, by preserving the hostname throughout the routing.

In other words :

  1. From my browser, I hit 'https://a.b.com/d1'

  2. Openshift HAProxy Router 1 sees a.b.com --> maps to 1.2.3.4:443 (Openshift haproxy Router 2)

  3. Openshift haproxy Router 2 (residing in a different cluster at 1.2.3.4:443) sees a.b.com/d1 --> maps to a service called d1

The requirement is that we should be able to create these routes dynamically on a running cluster/router when needed.

Any suggestions on how to accomplish this ? What would be the TLS setting in this case for each route?

I do not see an option to create IP based (non-service) routing from openshift web console.

user1722908
  • 535
  • 2
  • 9
  • 21

1 Answers1

0

You can add an "external service" to Openshift and let it be done automatically. I've done a similar configuration, with Openshift serving requests and redirecting them to services it wasn't hosting. You can find more information here.

mrik974
  • 465
  • 2
  • 7
  • 17