As soon as I started using YAML for OpenShift configuration I didn’t turn back. It is so much simpler to handle. Project routes can be configured in the web console but you can also import YAML.
Here is an example of such a YAML:
01 | apiVersion: v1 |
02 | kind: Route |
03 | metadata: |
04 | name: myapp |
05 | labels: |
06 | app: myapp |
07 | name: myapp |
08 | spec: |
09 | host: mysuperdomain.se |
10 | path: /myapp |
11 | port: |
12 | targetPort: 8080-tcp |
13 | to: |
14 | kind: Service |
15 | name: myapp |
NOTE! You need to setup a project service first so you have something to reference in the route (spec/to)
Tested on OpenShift Web Console: v3.11.153