πŸš€ DevOps & SRE Certification Program πŸ“… Starting: 1st of Every Month 🀝 +91 8409492687 πŸ” Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

OpenShift Local (CRC) – Basic Learning Workflow

πŸ”§ Updated for OpenShift 4.14+

This tutorial helps you practice real-world OpenShift workflows locally using CRC.


βœ… Step 1: Login to the Web Console and CLI

πŸ”Ή Web Console

crc console --credentials

Copy the admin URL and kubeadmin credentials β†’ open in browser.

πŸ”Ή CLI

eval $(crc oc-env)
oc login -u kubeadmin -p <password> --insecure-skip-tls-verify

βœ… Step 2: Understand Projects (Namespaces)

πŸ”Ή List All Projects:

oc get projects

πŸ”Ή Create Your Own:

oc new-project demo-app

βœ… Step 3: Deploy Your First Application

πŸ”Ή Using CLI (quickstart):

oc new-app nginx

πŸ”Ή Expose it:

oc expose svc/nginx

πŸ”Ή Get Route:

oc get route

Test in browser using the exposed route.


βœ… Step 4: Work with the Developer Console

  1. Go to the Web Console β†’ Developer View
  2. Switch to demo-app project
  3. Click +Add β†’ Use β€œContainer Image”
  4. Search for image like node:latest, php:8.2-apache, or quay.io/...

This gives visual understanding of how apps, builds, and deployments connect.


βœ… Step 5: Build from Source (Git to Deployment)

πŸ”Ή Deploy from Git (Node.js example):

oc new-app https://github.com/sclorg/nodejs-ex.git

πŸ”Ή Monitor:

oc get builds
oc logs -f bc/nodejs-ex

πŸ”Ή Access:

oc expose svc/nodejs-ex
oc get route

βœ… Step 6: Scale Applications

πŸ”Ή Increase Pods:

oc scale --replicas=3 deployment/nginx

πŸ”Ή Check Pods:

oc get pods -o wide

βœ… Step 7: Access Pod Shell & Logs

oc rsh <pod-name>
oc logs <pod-name>

Use this for debugging and viewing container state.


βœ… Step 8: Set Resource Limits

oc set resources deployment nginx \
  --limits=cpu=500m,memory=256Mi \
  --requests=cpu=200m,memory=128Mi

βœ… Step 9: Understand and Apply YAML

  1. Export a deployment: oc get deployment nginx -o yaml > nginx.yaml
  2. Edit and apply: oc apply -f nginx.yaml

βœ… Step 10: Use Secrets and ConfigMaps

πŸ”Ή Create ConfigMap:

oc create configmap app-config --from-literal=ENV=prod

πŸ”Ή Create Secret:

oc create secret generic app-secret --from-literal=DB_PASS=admin123

πŸ”Ή Mount or Inject via ENV in deployment YAML.


βœ… Step 11: OpenShift Pipelines (Tekton)

  1. In OperatorHub, install OpenShift Pipelines Operator
  2. Create:
    • PipelineResource
    • Task
    • Pipeline
  3. Use the developer console’s Pipelines view to build CI/CD

βœ… Step 12: Monitor with Web UI

  • Use Observe β†’ Metrics
  • View Dashboard, Topology, and Builds
  • Use Pod terminal from console

βœ… Step 13: Delete a Project

oc delete project demo-app

πŸ“š Bonus Tips:

FeatureCLI Command
List all Podsoc get pods
View eventsoc get events
Port Forwardoc port-forward svc/nginx 8080:80
RoleBindingoc adm policy add-role-to-user admin developer
Enable Dev ViewUse toggle in OpenShift console UI

πŸ§ͺ Practice Ideas:

  • Deploy a multi-container app with mysql + wordpress
  • Create blue-green deployments
  • Use Tekton pipeline to auto-deploy from GitHub

Subscribe
Notify of
guest


0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x