Skip to main content

Running an API gateway on OpenShift: architecture checklist

What to prepare before you install G8 on OpenShift: Environments, the database, the console, the G8 engines and the connections between them.

By Akif F. Güven Operations

What this checklist covers

G8 runs inside your OpenShift cluster: the console and management API, and a G8 engine cluster for each Environment. API traffic runs from your API clients through the G8 engine to your backend services.

Go through this checklist with your platform and security teams before a proof of concept. It covers architecture decisions; the installation commands are in the documentation. The three screenshots show where the decisions land in the console once the install is up: the form that connects an Environment, and the audit record it leaves.

Prerequisites

  • An OpenShift cluster where you can create projects for G8 and its G8 engines.
  • A PostgreSQL database for G8 (tested with PostgreSQL 18).
  • DNS names and TLS certificates for the console and for API traffic.
  • Your organization’s certificate authority, if your services use internal certificates.
  • Optional: Prometheus for Analytics and Elasticsearch or OpenSearch for Traffic Explorer, in each Environment where you want them.
  • Optional: a log collector that takes G8’s audit log lines to your SIEM.

Checklist

  1. Decide your Environments. Each Environment, such as Development, Staging and Production, is a G8 engine cluster that G8 manages. Decide where each one runs: in its own project, or in a separate cluster for Production.
  2. Plan the database. G8 keeps its data in a PostgreSQL database you provide; one database serves every Environment. Add it to your backup plan: G8 comes with tools to back up and restore it.
  3. Place the console and management API. Run them as multiple replicas that share the database. They sit beside the traffic path: API traffic does not pass through them.
  4. Connect each G8 engine. G8 manages each G8 engine cluster through the engine’s admin interface. Allow that interface only from G8, for example with a network policy.
  5. Send API traffic to the gateway. Expose the G8 engine with an OpenShift Route or your load balancer, and give the console its own address for your teams.
  6. Connect observability and audit. Analytics reads request counts from Prometheus. Traffic Explorer reads request records from Elasticsearch or OpenSearch. Point your log collector at G8’s audit log lines.
  7. Agree on sizing. Sizing is agreed during the proof of concept, from your traffic and your Environments.

Important: Keep the G8 engine’s admin interface off your shared networks. G8 stores the gateway admin keys encrypted with AES-256-GCM under a key you hold; anyone who can reach the interface with a key can change the gateway.

Where steps 4 to 6 land in the console

Steps 4 to 6 end in one form, Environments › Add environment, and nothing is written until you create the Environment. The Engine section takes the engine’s Admin API address and key and the address API clients call. The key is sent as the engine’s API key header, stored sealed, and not shown again after you save.

The Engine fields of the Add environment form: Admin API URL, the admin key masked as you type it, and the Gateway URL The three values of step 4 and step 5. A Test connection button under them checks the Admin API, and the data plane too when a Gateway URL is given; the Admin API test must pass.

The Observability section takes the log store and the Prometheus of step 6, with the account the console reads with. The names the Environment’s data carries in both stores follow the slug and are shown under the fields; they are not edited.

The Observability section of the Add environment form: Elasticsearch URL, the reader account, the Prometheus URL, and under them the derived index pattern g8-production-access-* and the label g8_environment="production" Each store has its own Test connection button. The index pattern and the metric label are derived from the slug, so the accounts you create in the stores can be scoped to exactly these names.

Creating the Environment is itself an audit record, in the platform audit log, with the actor, the time and what the Environment was created with.

The platform audit record of the Production Environment being added: the action, the result, the actor and the target The first entry of a new Environment’s history. Every connection change after it is a record too.

OpenShift specifics

  • G8 runs under OpenShift’s default restricted security profile, without extra privileges.
  • The management API and console run from a minimal container image as a non-root user.
  • Add your organization’s certificate authority to G8. Certificate verification can’t be turned off.

Tip: For a first look, Docker on a single host is enough. Use OpenShift for a proof of concept that should look like production.

Next steps

The installation steps for OpenShift, with every setting, are in the documentation. What the install consists of is on What G8 installs and what you provide.

After installation, set up your Environments and copy configuration between them: Promoting gateway configuration from staging to production.

Written by
Akif F. Güven
Engineer, G8
Was this helpful?
Next step

See G8 in a demo

We’ll show you the console with APIs and AI traffic like yours, and answer the questions these articles leave open.

  1. 01Demo
  2. 02Proof of conceptOn Docker for a quick start, or on the infrastructure you plan to run G8 on.
  3. 03LicenseWe prepare a quote for your edition and nodes, and you receive a signed license file.