liveBook · Manning

Quarkus-container-image-openshift

As explained in Quarkus in Action

The quarkus-openshift extension integrates Quarkus applications with OpenShift build, image, and deployment capabilities.

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

How Quarkus in Action covers it

How deep it goes
Explains S2I image creation and deployment configuration, then stops short of detailing OpenShift build internals.
Examples
Uses five car rental services, S2I deployment scripts, service hostnames, route exposure, and oc manifest commands.
What it assumes
Assumes familiarity with Quarkus services and OpenShift or Kubernetes networking, while introducing the S2I build workflow.
What you can do after
Operate/configure Quarkus services for OpenShift image builds, internal service communication, route exposure, and environment-specific deployment settings.
How it connects
Connects container images with OpenShift, S2I, Kubernetes Service resources, routes, environment variables, and deployment manifests.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Quarkus in Action. The section links point to the parts of the book it draws on.