DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • How to Quickly Create and Easily Configure a Local Redis Cluster
  • Real-Time Operating Systems (RTOS) in Embedded Systems
  • Establishing a Highly Available Kubernetes Cluster on AWS With Kops
  • Unveiling Real-Time Operating Systems (RTOS): The Heartbeat of Modern Embedded Systems

Trending

  • Integrating Security as Code: A Necessity for DevSecOps
  • A Complete Guide to Modern AI Developer Tools
  • Mastering Advanced Traffic Management in Multi-Cloud Kubernetes: Scaling With Multiple Istio Ingress Gateways
  • The Human Side of Logs: What Unstructured Data Is Trying to Tell You
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. OpenShift Container Platform 4.11 Cluster Setup

OpenShift Container Platform 4.11 Cluster Setup

In this article, I will walk you through OpenShift Container Platform 4.11 cluster setup on Linux. Further, I will be creating a namespace and deployment on OCP cluster.

By 
Vamsi Kiran Naidu user avatar
Vamsi Kiran Naidu
·
Jan. 10, 23 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
2.8K Views

Join the DZone community and get the full member experience.

Join For Free

Introduction

In this article, I will walk you through OpenShift Container Platform 4.11 cluster setup on Linux. Further, I will be creating a namespace and deployment on OCP cluster.

Prerequisite

Register and create a red hat account using this link: Redhat User Registration Page. Once an account has been created, log on to the red hat developer portal using this link: OCP Cluster Page.  

Minimum Hardware requirement for OpenShift Container Platform.

  • 4 physical CPU cores
  • 9 GB of free RAM memory
  • 35 GB of storage space

Minimum OS requirement.

  • RHEL 7,8, and 9.

There are multiple other platforms and OS version OpenShift Container Platform installation supported. Here is the official link from Red Hat Min-Sys-Requirement for supported platforms.

Creating OCP Cluster

Once all the prerequisites are satisfied, click on OCP Cluster Page, then click on create cluster. 

OCP Cluster Page










Then select an OpenShift cluster type to create as local, where Red Hat offers cloud and on-premises BareMetal. For our use case, we are selecting local, which will create a minimal cluster on your desktop/laptop for local development and testing.

Select Operating System









As highlighted in yellow in the above image, based on your local desktop/laptop Operating System, select the supported operating system from Linux/Windows and macOS. For this article, we are selecting Linux since my local operating system on RHEL 9. 

After Selecting OS then, click on “Download OpenShiftLocal," which will download a package with the file name crc-linux-amd64.tar.xz , then download or copy your pull secret. You'll be prompted for this information during installation.

Copy the OpenShift Local archive for your operating system from the download directory to the target path(/opt/oclab) and extract  or  place the binary in your $PATH or by creating a directory /opt/oclab as shown below.

Shell
 
sudo mkdir -p /opt/oclab
sudo chwon -R ocadmin:ocadmin /opt/oclab
sudo su – ocadmin
cd /opt/oclab
cp -p /tmp/crc-linux-amd64.tar.xz .
tar -xvf crc-linux-amd64.tar.xz


The output will be like below, as shown.






Extract the CRC package under /opt/oclab then execute “CRC setup” to set up your host operating system for the OpenShift Local virtual machine and run the below commands.

Shell
 
cd /opt/oclab
cd crc-linux-2.12.0-amd64/
./crc setup 


The output will be like below, as shown.











Then, run crc start to create a minimal OpenShift 4 cluster on your computer.

Shell
 
cd /home/ocadmin/.crc/bin
./crc start


We can see while crc start-up execution provisioning a CRC VMwith the required configuration.











Creating CRC VM for OpenShift 4.11.18 cluster with the following operators DNS, image-registry, network, openshift-controller-manager , operator-lifecycle-manager-packageserver the installation will be completed.  A CRC-admin and CRC-developer context to kubeconfig will be configured for the OpenShift cluster. 

Shell
 
echo "export PATH=$PATH:<crc-extracted-path>/.crc/cache/crc_libvirt_4.11.18_amd64/" >>.bash_profile
Example:
echo "export PATH=$PATH:/home/ocadmin/.crc/cache/crc_libvirt_4.11.18_amd64/" >>.bash_profile


Once crc is started up, that will display kubeadmin and developer credentials with web-GUI URL details and an oc cli command to log onocp cluster.










As mentioned, above OpenShift cluster started, which is accessible through oc command line and web console.

OCP WEB-GUI URL

OCP cluster master









Login into the OCP cluster master node and run the following commands to get a number of nodes, create a project, and schedule the deployment.

Shell
 
   oc get nodes
   oc create namespace cgt-app-ui
   oc create deployment app-ui –image=nginx:latest –replicas=1 -n cgt-app-ui


Output for the above command execution will be as shown below.

Output




Summary

Red Hat OpenShift Local is a great place where you can quickly spin up an OpenShift cluster for development purposes. It uses a single node that behaves as both a control plane and a worker node. For example, when migrating applications to microservices on containers, these containers will be orchestrated from Red Hat OpenShift.

OpenShift Use case cluster Linux (operating system) operating system

Opinions expressed by DZone contributors are their own.

Related

  • How to Quickly Create and Easily Configure a Local Redis Cluster
  • Real-Time Operating Systems (RTOS) in Embedded Systems
  • Establishing a Highly Available Kubernetes Cluster on AWS With Kops
  • Unveiling Real-Time Operating Systems (RTOS): The Heartbeat of Modern Embedded Systems

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!