quarkus-container-image-openshift connects Quarkus applications to OpenShift binary builds. It uploads the built artifact and dependencies to the cluster, where OpenShift’s build system creates the application image through source-to-image (S2I). The extension generates the required build configuration, so image creation does not require a local Docker or Podman build. section 11.2
Deploying a Quarkus service to OpenShift typically requires these adjustments:
- Add the quarkus-openshift extension to each service. section 11.6.3
- Select the OpenShift image builder, configure the S2I profile, disable generated ServiceMonitor resources when unnecessary, and expose a public route. section 11.6.3
- Replace localhost endpoints with Kubernetes Service hostnames; generated services commonly expose container port 808x externally through port 80. section 11.6.3
- Use quarkus.openshift.env.vars.* properties to inject deployment-specific URLs, credentials, database settings, messaging endpoints, and observability configuration into generated manifests. section 11.6.3
Car rental services on OpenShift Sandbox
A multi-service car rental system adds quarkus-openshift to its services, exposes routes, and changes inter-service URLs to names such as reservation-service, inventory-service, and rental-service. Deployment can use the supplied S2I script or an oc apply command for the complete manifest. Generated resources can later be removed with oc delete. section 11.6.3
%s2i.quarkus.container-image.registry= %s2i.quarkus.container-image.group= %s2i.quarkus.container-image.tag= quarkus.container-image.builder=openshift quarkus.openshift.prometheus.generate-service-monitor=false quarkus.openshift.route.expose=true
Browse the compact configuration listing for selecting the OpenShift builder, defining S2I image coordinates, disabling ServiceMonitor generation, and exposing a route. section 11.6.3
