OpenShift is a powerful container application platform that extends Kubernetes with developer-friendly tools, robust security, and an integrated CI/CD pipeline. Whether you’re exploring the community edition (OKD) or diving into Enterprise OpenShift, this guide will help you get started with installation, navigating the web console, and using the oc
CLI.
1. What is OpenShift?
OpenShift is an enterprise-ready container orchestration platform built on Kubernetes. It simplifies application development, deployment, and management by providing:
- An intuitive web console for managing clusters and applications.
- The powerful
oc
CLI for command-line operations. - Built‑in tools for Source-to-Image (S2I) builds, CI/CD pipelines, and advanced security.
2. Installing OpenShift
There are two popular ways to get started:
A. OKD (Community Edition)
OKD is the open-source version of OpenShift. It’s ideal for testing, learning, and small-scale deployments.
Step-by-Step Guide for OKD:
- Download the OKD Installer:
Visit the OKD website to download the latest installer. - Set Up a Local Cluster:
For local development, consider using CodeReady Containers which simplifies running a single-node OpenShift cluster on your machine.crc setup crc start
This will provision a local OKD cluster and provide you with the login credentials and a URL for the web console. - Access the Web Console:
Once the cluster is up, open your browser and navigate to the provided URL (e.g.,https://console-openshift-console.apps-crc.testing
). - Login:
Use the credentials provided by CodeReady Containers to log in.
B. Enterprise OpenShift
Enterprise OpenShift offers additional features, support, and integrations for mission‑critical workloads.
Step-by-Step Guide for Enterprise OpenShift:
- Contact Your Vendor:
For Enterprise OpenShift, you’ll typically work with Red Hat or a certified partner. Visit Red Hat OpenShift for more details and to start a trial. - Provision the Cluster:
Enterprise deployments can be set up on-premises, in the cloud, or as a hybrid solution. Use the Red Hat OpenShift installer for a guided setup.# Example command to launch the installer (details vary based on your environment) ./openshift-install create cluster --dir=cluster-config --log-level=info
- Configure the Cluster:
Follow the prompts to specify cluster settings such as networking, storage, and authentication. - Access the Web Console:
Once provisioned, log in to the web console using the credentials set during installation.
3. Navigating the OpenShift Web Console
The OpenShift web console provides a visual interface to manage your cluster. Key features include:
- Dashboard:
A high-level view of your cluster’s health, resource usage, and recent activity. - Projects:
Organize your applications into projects (namespaces) for better management. - Applications:
Deploy, monitor, and manage applications using built‑in templates and workflows. - Monitoring & Logging:
Access built‑in tools for performance monitoring and log management. - Developer Tools:
Manage Source-to-Image (S2I) builds, view pipelines, and integrate with Git repositories.
4. Using the oc
CLI
The oc
CLI is a command-line tool that extends kubectl
with OpenShift-specific functionality.
A. Installing oc
Download the oc
CLI from the OpenShift CLI downloads page and add it to your system’s PATH.
B. Basic Commands
- Login to Your Cluster:
oc login https://api.<cluster-domain>:6443 --token=<your-token>
- List Projects:
oc get projects
- Create a New Project:
oc new-project my-project
- Deploy an Application:
oc new-app nginx:latest
- View Application Details:
oc status
- Expose a Service:
oc expose svc/nginx
C. Advanced oc
Usage
- View Logs:
oc logs <pod-name>
- Execute a Command in a Pod:
oc exec -it <pod-name> -- /bin/bash
- Apply Configuration Changes:
oc apply -f my-config.yaml
5. Conclusion
Getting started with OpenShift is a rewarding journey that empowers developers and DevOps teams to build, deploy, and manage containerized applications with ease. Whether you choose OKD for local exploration or Enterprise OpenShift for mission‑critical workloads, the platform offers powerful tools like the web console and oc
CLI to streamline your operations.
6. 🤝 Connect With Us
Are you looking for certified professionals or need expert guidance on deploying and managing your OpenShift environment? We’re here to help!
🔹 Get Certified Candidates: Hire skilled professionals with deep expertise in OpenShift and cloud-native technologies.
🔹 Project Consultation: Receive hands‑on support and best practices tailored to your environment.