Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

โ€œInvest in yourself โ€” your confidence is always worth it.โ€

Explore Cosmetic Hospitals

Start your journey today โ€” compare options in one place.

Advanced OpenShift Local Learning Workflow: Step-by-Step Tutorials Guide

This guide assumes you already have OpenShift Local (formerly CRC) installed and running on your macOS or Linux machine. Now it’s time to level up your OpenShift skills with advanced, hands-on workflows designed to mimic real-world cluster usage.


โœ… Overview of What You’ll Learn

  1. Creating and Managing Projects
  2. Deploying Applications with Templates and Helm
  3. Configuring Routes and Services
  4. Working with Persistent Storage (PVC, PV)
  5. CI/CD Pipelines using OpenShift Pipelines (Tekton)
  6. Managing Secrets and ConfigMaps
  7. Resource Limits, Quotas, and Requests
  8. Monitoring and Logging with built-in tools
  9. Role-Based Access Control (RBAC)
  10. GitOps (Optional Bonus)

๐ŸŽฏ 1. Create and Manage Projects (Namespaces)

oc new-project dev-project
oc get projects
Code language: JavaScript (javascript)

Explanation:

  • Projects are isolated Kubernetes namespaces with OpenShift-specific metadata.
  • Use them to separate development, staging, and production workloads.

๐Ÿš€ 2. Deploy Applications via Templates or Helm

Option A: Using OpenShift Templates

oc new-app --name=my-nginx nginx
Code language: JavaScript (javascript)

Option B: Using Helm Charts (if Helm is enabled)

helm repo add bitnami https://charts.bitnami.com/bitnami
helm install my-mysql bitnami/mysql
Code language: JavaScript (javascript)

Scenario: Deploy a frontend-backend app using templates or Helm.


๐ŸŒ 3. Expose Applications with Routes

oc expose svc/my-nginx

Explanation:

  • This creates an OpenShift Route, which exposes a service to the external world.
  • Use this for browser access to your apps.

๐Ÿ’พ 4. Work with Persistent Volumes (PVC/PV)

Create PVC

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: my-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
oc apply -f pvc.yaml
Code language: CSS (css)

Scenario: Use this PVC in a deployment for MySQL/Postgres persistence.


๐Ÿ” 5. Build CI/CD with OpenShift Pipelines (Tekton)

oc apply -f https://raw.githubusercontent.com/tektoncd/pipeline/main/examples/v1beta1/taskruns/taskrun.yaml
Code language: JavaScript (javascript)

Scenario:

  • Build and deploy from GitHub automatically using Pipeline, Task, TaskRun resources.
  • Use Triggers and EventListeners to integrate with GitHub Webhooks.

๐Ÿ” 6. Manage Secrets and ConfigMaps

oc create secret generic db-secret --from-literal=username=admin --from-literal=password=redhat
oc create configmap app-config --from-literal=theme=dark
Code language: JavaScript (javascript)

Use in Deployments:

envFrom:
  - secretRef:
      name: db-secret
  - configMapRef:
      name: app-config

๐Ÿ“ฆ 7. Configure Quotas and Limits

oc create quota mem-cpu-quota --hard=cpu=2,memory=4Gi,pods=10

Scenario: Prevent developers from consuming all cluster resources.


๐Ÿ“Š 8. Monitor and Log

View Pod Logs

oc logs <pod-name>
Code language: HTML, XML (xml)

View Cluster Console Metrics

  • Navigate to https://console-openshift-console.apps-crc.testing/ โ†’ Observe dashboards.
  • View memory, CPU, and event logs per namespace or pod.

๐Ÿ‘ฅ 9. Role-Based Access Control (RBAC)

oc create role dev-reader --verb=get,list --resource=pods
oc create rolebinding dev-binding --role=dev-reader --user=developer
Code language: JavaScript (javascript)

Scenario: Allow a user to only read pod data in a project.


๐Ÿ”„ 10. GitOps (Optional Advanced Scenario)

  1. Install Argo CD Operator
  2. Connect Argo CD to a Git repository
  3. Sync deployments automatically from Git
oc apply -f argo-install.yaml
Code language: CSS (css)

Use Case: Fully automate application deployments with Git versioning and drift detection.


โœ… Summary

This advanced OpenShift Local workflow is ideal for developers, DevOps engineers, and learners who want to:

  • Simulate real-world Kubernetes workloads
  • Learn GitOps and CI/CD pipelines
  • Understand the essentials of secure and scalable OpenShift development

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
Iโ€™m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

List of all Job Roles, Job Titles in Software and IT Companies

The software and IT industry is home to a diverse array of job roles and titles, reflecting the dynamic and ever-evolving nature of technology. From core technical…

Read More

Best DevOps Tools in 2024

hereโ€™s a clear, structured breakdown of the Best DevOps Tools (grouped by categories), so you can use it for learning, training, or posts. ๐Ÿš€ Best DevOps Tools…

Read More

OpenShift Install & Configurations using OpenShift Local in windows laptops/desktops

Below is the 100% correct and updated step-by-step guide to install and configure OpenShift Local (aka CRC) on Windows 10/11 laptops or desktops using the correct crc…

Read More

Openshift: How to configure Azure openshift ARO with Custom Domain

Step-by-Step Guide: Configuring Azure Red Hat OpenShift (ARO) with a Custom Domain Setting up a custom domain for your ARO cluster involves both Azure and DNS provider…

Read More

Openshift: Lab 10 – View performance information using the OpenShift web console

Rajesh Kumar Iโ€™m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus. I share tech blog at DevOps School, travel stories at…

Read More

Openshift: How to add Helm Repository in Openshift

Adding a Helm repository in OpenShift is a common step to manage and deploy Helm charts in your OpenShift cluster. OpenShift supports Helm CLI out of the…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x