Red Hat OpenShift — Introduction
Welcome to the OpenShift Tutorial
Red Hat OpenShift is an enterprise Kubernetes platform that extends upstream Kubernetes with developer and operational tools, security features, and a complete CI/CD pipeline. It’s built on top of Kubernetes but adds significant enterprise capabilities.
What is OpenShift?
OpenShift adds to Kubernetes:
- OpenShift Console — Full-featured web UI for cluster management
- Routes — Built-in ingress with TLS termination (similar to Ingress but more integrated)
- Source-to-Image (S2I) — Build container images directly from source code
- Operator Lifecycle Manager (OLM) — Manage Operators from OperatorHub
- Security Context Constraints (SCCs) — More restrictive than standard Kubernetes PSA
- Projects — Multi-tenant namespaces with quotas and RBAC
OpenShift vs Kubernetes
| Feature | Kubernetes | OpenShift |
|---|---|---|
| Web console | Dashboard (basic) | Full-featured console |
| CLI | kubectl | oc (superset of kubectl) |
| Ingress | Ingress resource | Routes (+ Ingress support) |
| Image builds | External CI/CD | Built-in S2I, BuildConfigs |
| Security | PSA/PSP | SCCs (more restrictive) |
| Operators | Manual install | OLM + OperatorHub |
| Container runtime | containerd/CRI-O | CRI-O only |
| Updates | kubeadm upgrade | Over-the-air (OTA) |
OpenShift Editions
| Edition | Description |
|---|---|
| OpenShift Container Platform | Self-managed, on-premises or cloud |
| OpenShift Dedicated | Managed by Red Hat on AWS/GCP |
| Azure Red Hat OpenShift (ARO) | Managed jointly by Microsoft and Red Hat |
| ROSA | Red Hat OpenShift on AWS (managed) |
| OpenShift Local (CRC) | Single-node for local development |
Prerequisites
Before starting this tutorial, you should have:
- Completed the Kubernetes Foundation Tutorial
- OpenShift Local (CRC) for hands-on practice
- A Red Hat account (free developer account)
ocCLI installed
Installing OpenShift Local (CRC)
# Download from Red Hat Developer portal
# https://console.redhat.com/openshift/create/local
# Setup (one-time)
crc setup
# Start the cluster
crc start
# Get credentials
crc console --credentials
# Login with oc CLI
eval $(crc oc-env)
oc login -u developer -p developer https://api.crc.testing:6443
What You’ll Learn
- OpenShift architecture and how it extends Kubernetes
- Managing Projects, Users, and RBAC with OpenShift
- Routes for exposing applications with TLS
- Building images with S2I and BuildConfigs
- Managing Operators via OLM and OperatorHub
- Security Context Constraints (SCCs)
- CI/CD with Tekton Pipelines and GitOps with ArgoCD
Practice Questions
Q1: How does the OpenShift CLI (oc) relate to kubectl?
Show Answer
The `oc` CLI is a **superset of kubectl**. Every `kubectl` command works with `oc`. Additionally, `oc` adds OpenShift-specific commands: - `oc new-project` — Create a project (namespace with extras) - `oc new-app` — Create an application from source, image, or template - `oc expose` — Create a Route to expose a Service - `oc adm` — Administrative commands - `oc login` — Authenticate to the clusterQ2: What is a Route in OpenShift and how does it differ from a Kubernetes Ingress?