Skip to content

OpenShift Origin (OKD): A Comprehensive Guide to the Open-Source PaaS

OpenShift Origin

Introduction to OpenShift Origin

Platform as a Service (PaaS) solutions have revolutionized application deployment by abstracting infrastructure complexities, allowing developers to focus on coding. OpenShift Origin, now known as OKD, is an open-source PaaS developed by Red Hat, built on Kubernetes and Docker. It offers a robust platform for deploying, managing, and scaling containerized applications across hybrid cloud environments. This article explores OKD’s features, its integration with other software stacks, a step-by-step installation guide, practical usage, and a comparison with alternative PaaS solutions, all tailored for developers and enterprises seeking a flexible, self-hosted platform.

What is OpenShift Origin?

OpenShift Origin, rebranded as OKD (Origin Community Distribution) in 2018, is the open-source, community-driven upstream project for Red Hat’s OpenShift Container Platform. It is a Kubernetes-based PaaS that orchestrates Linux containers using CRI-O (previously Docker) and Kubernetes, running on Red Hat Enterprise Linux or community distributions like CentOS or Rocky Linux. OKD provides a developer- and operations-friendly platform for building, deploying, and managing containerized applications, with features like automated builds, CI/CD pipelines, and a web console.

Key features include:

  • Kubernetes Foundation: Leverages Kubernetes for container orchestration, with added tools for developer productivity.
  • Web Console and CLI: Offers a responsive web interface and the oc CLI, extending Kubernetes’ kubectl with additional commands.
  • Source-to-Image (S2I): Automates building container images from source code, though transitioning to Tekton for CI/CD.
  • ImageStreams and Templates: Simplifies application deployment and management with reusable configurations.
  • Security Context Constraints (SCCs): Fine-grained control over pod permissions, enhancing security.
  • Integrated Registry: Built-in container registry (Quay) for storing images and artifacts.

OKD is ideal for developers and organizations seeking a free, open-source PaaS with enterprise-grade features, deployable on-premises, in the cloud, or in hybrid environments.

Integration with Other Software Stacks

OKD integrates seamlessly with modern DevOps and cloud-native tools, enhancing its versatility:

  1. Kubernetes Ecosystem: As a Kubernetes distribution, OKD supports Kubernetes-native tools like Helm, Operators (via OperatorHub), and KubeVirt for virtual machines.
  2. CI/CD Pipelines: Integrates with Tekton (OpenShift Pipelines) for cloud-native CI/CD, and supports Jenkins or GitLab CI for automated deployments.
  3. Container Registries: Uses Red Hat Quay or Docker Hub to store and manage container images.
  4. Monitoring and Logging: Integrates with Prometheus, Grafana, and EFK (Elasticsearch, Fluentd, Kibana) for metrics and log aggregation.
  5. Service Mesh: Supports Istio or OpenShift Service Mesh for microservices communication, providing observability and traffic management.
  6. Databases: OperatorHub enables one-click deployment of databases like PostgreSQL, MySQL, or MongoDB, integrated via Kubernetes operators.
  7. Infrastructure: Runs on AWS, Azure, GCP, OpenStack, vSphere, or bare metal, offering multi-cloud flexibility.

This interoperability makes OKD suitable for microservices, serverless workloads (via Knative), and traditional applications, aligning with enterprise DevOps workflows.

Setting Up an OpenShift Origin Environment: Step-by-Step Installation Guide

This guide covers installing OKD 4.15 (the latest stable version as of June 2025) on a single-node cluster using a CentOS 8 Stream VM for testing. Production setups typically involve multi-node clusters, but this is ideal for learning.

Prerequisites

  • Hardware: 8GB RAM, 50GB disk space, 4 CPU cores.
  • Software:
    • CentOS 8 Stream (or Rocky Linux 8).
    • SSH access with root privileges.
    • Domain name (optional, for production).
  • Tools: oc CLI, kubectl, Git, and Docker.

Step-by-Step Installation

Step 1: Set Up the Server

  1. Provision a CentOS VM:
    • Create a VM on a cloud provider (e.g., AWS EC2) or locally using VirtualBox.
    • Update the system:bashsudo dnf update -y
  2. Install Dependencies:bashsudo dnf install -y git wget unzip firewalld sudo systemctl enable --now firewalld sudo firewall-cmd --add-port=6443/tcp --permanent sudo firewall-cmd --add-port=443/tcp --permanent sudo firewall-cmd --reload

Step 2: Install the OpenShift CLI (oc)

  1. Download oc:bashwget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz tar xvf openshift-client-linux.tar.gz sudo mv oc kubectl /usr/local/bin/
  2. Verify Installation:bashoc version

Step 3: Install OKD Using CodeReady Containers (CRC)

For a single-node setup, CodeReady Containers simplifies OKD deployment.

  1. Download CRC:bashwget https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz tar xvf crc-linux-amd64.tar.xz sudo mv crc /usr/local/bin/
  2. Set Up CRC:bashcrc setupThis configures the VM environment (requires libvirt or VirtualBox).
  3. Start the OKD Cluster:bashcrc start
    • Note the admin credentials (e.g., kubeadmin and password) displayed in the output.
    • This creates a single-node OKD cluster accessible at https://api.crc.testing:6443.

Step 4: Configure DNS (Optional for Production)

  1. Set Up a Domain:
    • Point *.apps.crc.testing to the VM’s IP using a DNS provider.
    • Update the cluster’s domain in the CRC configuration if using a custom domain.

Step 5: Verify the Installation

  1. Log in to the Cluster:bashoc login https://api.crc.testing:6443 -u kubeadmin -p <password>
  2. Access the Web Console:
    • Open https://console-openshift-console.apps.crc.testing in a browser.
    • Log in with kubeadmin and the provided password.
  3. Check Cluster Status:bashoc get nodes

Troubleshooting

  • Port Issues: Ensure ports 6443, 443, and 80 are open (sudo firewall-cmd –list-ports).
  • Memory Errors: Increase VM memory to 8GB in VirtualBox or cloud provider settings.
  • CRC Failures: Run crc status to diagnose issues and ensure libvirt is active.

Using OpenShift Origin

Deploying an Application

  1. Create a Project:bashoc new-project my-project
  2. Create a Sample App:
    • Create a Node.js app (app.js):javascriptconst express = require('express'); const app = express(); app.get('/', (req, res) => res.send('Hello from OKD!')); app.listen(process.env.PORT || 8080);
    • Create package.json:json{ "name": "okd-app", "version": "1.0.0", "dependencies": { "express": "^4.17.1" } }
  3. Deploy the App:bashoc new-app . --name=my-appOKD uses S2I to build a container image and deploy it.
  4. Expose the App:bashoc expose svc/my-appAccess the app at the generated route (e.g., http://my-app-my-project.apps.crc.testing).

Managing Services

  1. Deploy a Database:
    • In the web console, go to OperatorHub > PostgreSQL > Install.
    • Configure and create the database instance.
    • Bind to the app using:bashoc set env dc/my-app DATABASE_URL=<connection-string>
  2. Redeploy the App:bashoc rollout latest dc/my-app

Scaling and Monitoring

  1. Scale the App:bashoc scale dc/my-app --replicas=2
  2. View Logs:bashoc logs dc/my-app
  3. Monitor with Prometheus:
    • Install the Prometheus operator via OperatorHub and access metrics in the web console.

Comparison with Alternatives

OKD competes with PaaS solutions like Cloud Foundry, Dokku, CapRover, and Heroku. Here’s a comparison:

FeatureOKD (OpenShift Origin)Cloud FoundryDokkuCapRover
Open SourceYes (Apache 2.0)Yes (Apache 2.0)Yes (MIT)Yes (Apache 2.0, with restrictions)
Deployment ModelKubernetes, multi-cloudBOSH/Diego, multi-cloudGit push, single serverDocker, single/multi-server
Ease of UseModerate (Kubernetes complexity)Moderate (BOSH learning curve)High (Heroku-like)High (GUI, one-click apps)
ScalingAuto-scaling, Kubernetes-backedAuto-scaling, enterprise-gradeManual scalingManual (Docker Swarm)
Service MarketplaceOperatorHub (databases, tools)Service brokersPlugins (e.g., PostgreSQL)One-click apps
Multi-CloudStrong (AWS, Azure, GCP, bare metal)Strong (AWS, Azure, GCP)Limited (single server)Moderate (Docker hosts)
Learning CurveHigh (Kubernetes expertise)Moderate (BOSH, CLI)Low (Git, Docker)Low (Docker knowledge)
Resource UsageHeavy (multi-node for production)Heavy (multi-VM)Lightweight (single server)Lightweight (1GB RAM)
Community SupportStrong (Red Hat, OKD community)Strong (Cloud Foundry Foundation)Active but smallerModerate (single maintainer)

Pros of OKD

  • Kubernetes-Native: Leverages Kubernetes’ robust ecosystem and portability.
  • Enterprise Features: Security, CI/CD, and monitoring tools rival commercial platforms.
  • Multi-Cloud: Supports diverse infrastructures, ideal for hybrid clouds.
  • Community-Driven: Free, with active development and testing of new features.

Cons of OKD

  • Complexity: Requires Kubernetes knowledge, steeper learning curve than Dokku or CapRover.
  • Resource Intensive: Single-node setups need significant resources; production clusters require multiple nodes.
  • No Official Support: Community-supported, unlike OpenShift Container Platform’s paid support.

When to Choose OKD

  • Ideal for teams with Kubernetes expertise needing a free, enterprise-grade PaaS.
  • Best for hybrid cloud or multi-cloud deployments.
  • Less suitable for small projects or developers seeking lightweight, single-server solutions (Dokku or CapRover better).

Conclusion

OKD (OpenShift Origin) is a powerful, open-source PaaS that extends Kubernetes with developer-friendly tools, making it a strong choice for containerized application deployment. Its integration with Kubernetes, CI/CD pipelines, and monitoring tools ensures flexibility for modern DevOps workflows. The installation guide above demonstrates how to set up a single-node cluster, while its usage instructions highlight its ease of deploying and managing apps. Compared to alternatives, OKD excels in enterprise-grade features and multi-cloud support but may be overkill for small-scale projects due to its complexity. For further exploration, visit the OKD documentation (https://okd.io) or join the OpenShift Commons community. Whether building microservices or hybrid cloud applications, OKD offers a robust platform for cloud-native development.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *