How to test external route to pod with xip.io on OpenShift v3?

Solution In Progress - Updated -

Environment

  • OpenShift Enterprise
    • 3.1

Issue

  • I want to test external routing to pod on OSEv3.
  • Do I have to setup DNS with wild card domain?

Resolution

  • You can use xip.io which is domain service for free.
step1. Check your environment can use xip.io

dig testapp.192.168.133.4.xip.io returns 192.168.133.4?

e.g)

$ dig testapp.192.168.133.4.xip.io
...
;; ANSWER SECTION:
testapp.192.168.133.4.xip.io. 282 IN    A   192.168.133.4

NOTE: 192.168.133.4 is the IP address of router pod's Node host.

step2. Expose service with hostname testapp.192.168.133.4.xip.io.

e.g)

$ oc expose --hostname=testapp.192.168.133.4.xip.io svc <SERVICE_NAME>
step3. Access to testapp.192.168.133.4.xip.io

e.g)

curl testapp.192.168.133.4.xip.io

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments