ποΈ 1οΈβ£ OpenShift Architecture¶
OpenShift is built on top of Kubernetes but adds enterprise layers.
It has 4 main layers:
π§ A. Control Plane (Master Layer)¶
Brain of the cluster.
Core Components:¶
- API Server β Entry point (kubectl / oc talk here)
- Scheduler β Decides where Pods run
- Controller Manager β Maintains desired state
- etcd β Stores cluster data
OpenShift Adds:¶
- OAuth Server (authentication)
- Web Console
- RBAC policies
- Security Context Constraints (SCC)
π If API server is down β cluster is unusable.
π₯οΈ B. Worker Nodes (Application Layer)¶
Where your containers run.
Each worker node has:
- kubelet
- kube-proxy
- CRI-O (container runtime)
- Pods
Your:
- Backend container
- Frontend container
- MongoDB container
All run inside Pods here.
π C. Routing Layer (OpenShift Special)¶
Instead of Kubernetes Ingress, OpenShift uses:
Routes¶
- Exposes application externally
- Uses HAProxy router
- Auto creates public URL
Example:
Flow: User β Route β Service β Pod
π¦ D. Image & Build Layer¶
OpenShift includes built-in CI/CD components:
ImageStreams¶
Tracks image versions.
BuildConfigs¶
Build image from:
- Git repo
- Dockerfile
- Source code
Internal Registry¶
Stores images inside cluster.
No need for external Docker registry (optional).
π 2οΈβ£ OpenShift Workflow (End-to-End)¶
Letβs simulate real DevOps workflow (like your medical project).
π Step 1: Developer Pushes Code¶
Developer pushes code to GitHub.
ποΈ Step 2: Build Trigger¶
OpenShift detects change via:
- Webhook
- Manual trigger
- Pipeline trigger
It starts build using BuildConfig.
π¦ Step 3: Image Creation¶
Build process:
- Pull source code
- Build container image
- Push to internal registry
- Update ImageStream
π Step 4: Deployment¶
Deployment object:
- Pulls new image
- Creates new Pods
- Performs rolling update
Old pods β terminated gradually.
π Step 5: Expose via Route¶
Route exposes service externally.
User accesses:
π Step 6: Scaling & Self Healing¶
If Pod crashes:
- Controller recreates it
If load increases:
- Scale replicas
π§ Complete Request Flow (Runtime)¶
When a user opens your app:
- DNS resolves
- Route receives request
- Router forwards to Service
- Service load balances to Pod
- Pod runs container
- Response sent back
π Security Workflow¶
When user logs in:
- OAuth server validates identity
- RBAC checks permissions
- SCC validates container security
OpenShift is stricter than vanilla Kubernetes.
π’ Deployment Models¶
OpenShift can run as:
- On-prem
- On AWS
- On Azure
- On GCP
- Managed services like Red Hat OpenShift Service on AWS
π§ Architecture Summary (Interview Ready)¶
OpenShift architecture consists of:
- Control Plane (API server, Scheduler, etcd)
- Worker Nodes (Run Pods)
- Routing Layer (Routes + HAProxy)
- Build & Image Layer (ImageStreams, BuildConfigs)
- Security Layer (OAuth, RBAC, SCC)
Workflow: Code β Build β Image β Deploy β Route β User β Monitor β Scale