← All insightsAutomation

Automating Red Hat OpenShift from scratch

CodeWizard Academy · 28 July 2025 · 3 min read · Intermediate

Anything you do to Red Hat OpenShift twice should be automated. This walks the path from a manual install to a repeatable, pipeline-driven setup.

1. Install it reproducibly

bash
# Local single-node cluster
crc setup && crc start
oc login -u developer https://api.crc.testing:6443

2. Describe the desired state

A Route exposing a Service over HTTPS.

yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata: { name: web }
spec:
  to: { kind: Service, name: web }
  port: { targetPort: 3000 }
  tls: { termination: edge }

3. Run it from CI

Build from source in-cluster with a BuildConfig.

yaml
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata: { name: web }
spec:
  source: { git: { uri: https://github.com/acme/web } }
  strategy: { type: Docker }
  output: { to: { kind: ImageStreamTag, name: 'web:latest' } }

Want senior help putting Red Hat OpenShift to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult