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

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 Tutorial โ€“ Deploy and Access Your First Applications using OpenShift Local

How to install oc? OpenShift: How to Install OpenShift CLI oc How to login? Login to the Openshift using Web Console and CLI using oc Copy the admin…

Read More

OpenShift Lab 14: Setting Up and Using OpenShift Serverless Functions on OpenShift Local

Lab Objective In this lab, you will install and use OpenShift Serverless Functions on OpenShift Local. You will create a simple Node.js serverless function, deploy it to…

Read More

OpenShift Lab 13: Deploy a Java Spring Boot Application with MySQL Using the OpenShift Web Console

Lab Objective In this lab, you will deploy a Java Spring Boot application on OpenShift using the OpenShift web console. You will deploy two components: The Java…

Read More

OpenShift Lab 12: Deploy an Application from an Existing Container Image Using the OpenShift Web Console

Lab Objective In this lab, you will deploy an application on OpenShift from an existing container image. This lab is different from building an application from source…

Read More

OpenShift: How to Install OpenShift CLIย oc

Option – 1 – REDHAT Websites URL – https://access.redhat.com/downloads/content/290/ver=4.18/rhel—9/4.18.11/x86_64/product-software Option – 2 – OKD Websites The OKD (Origin Community Distribution of Kubernetes for OpenShift) is the open-source…

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