A Route is an OpenShift resource that makes a Service reachable from outside the cluster through a public URL. It serves a different purpose from the Service hostname that deployments use to call one another inside OpenShift. section 11.3.4 section 11.6.3
To expose a Quarkus service during deployment:
- Add the quarkus-openshift extension and set `quarkus.openshift.route.expose=true` in `application.properties`. section 11.3.4 section 11.6.3
- Build and apply the generated `openshift.yml`, then run `oc get routes` to find the assigned host and the Service it targets. section 11.3.4
- Use Service names, not public routes or `localhost`, for calls between deployed services. A browser-facing Keycloak redirect needs Keycloak’s public route instead. section 11.6.3
Inventory service
After deploying the Inventory service, `oc get routes` shows its host and the `inventory-service` target. Open that host with `/q/graphql-ui` to reach the deployed UI. The example route uses HTTP because SSL was not configured; check the route’s scheme rather than assuming HTTPS. section 11.3.4
# Remove the Kubernetes configuration from the previous section -quarkus.kubernetes.env.vars.quarkus-datasource-jdbc-url= jdbc:mysql://mysql:3306/inventory -quarkus.kubernetes.prometheus.generate-service-monitor=false -quarkus.kubernetes.namespace=default quarkus.openshift.env.vars.quarkus-datasource-jdbc-url= jdbc:mysql://mysql:3306/inventory quarkus.openshift.prometheus.generate-service-monitor=false # Expose created service to the world quarkus.openshift.route.expose=true
The OpenShift properties enable Route creation alongside the Inventory service’s database and monitoring settings. section 11.3.4
