🚀 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 Tutorials – Basic Workflow using OpenShift Local

=========================================================
Step 1 - Register at https://www.redhat.com/en/technologies/cloud-computing/openshift/container-platform
=========================================================
=========================================================
Step 2 - Try it - Start your trials. [WAIT 10 mins]
=========================================================
=========================================================
Step 3 - Come to https://console.redhat.com/openshift
=========================================================
=========================================================
Step 4 - Create a Red Hat OpenShift Local
=========================================================
=========================================================
Step 5 - You need to enable HyperV feature in Windows - REBOOT REQUIRED
=========================================================
=========================================================
Step 6 - Download OpenShift Local
=========================================================
=========================================================
Step 7 - Download Pull secret
=========================================================
=========================================================
Step 8 - Install crc-windows-amd64 msi - REBOOT REQUIRED
=========================================================
=========================================================
Step 9 - Verify
=========================================================
C:\Users\Rajesh Kumar>where crc
C:\Program Files\Red Hat OpenShift Local\crc.exe
=========================================================
Step 10 - Run a Setup
=========================================================
$ crc setup
End Message - Your system is correctly setup for using CRC. Use 'crc start' to start the instance
=========================================================
Step 11 - Start a CRC
=========================================================
$ crc start
End Message - Started the OpenShift cluster.
The server is accessible via web console at:
https://console-openshift-console.apps-crc.testing
Log in as administrator:
Username: kubeadmin
Password: 6EWtq-5qXX3-Sm3i8-Kr6Gq
Log in as user:
Username: developer
Password: developer
Use the 'oc' command line interface:
$ eval $(crc oc-env)
$ oc login -u developer https://api.crc.testing:6443
=========================================================
Step 12 - Setup a Path
=========================================================
$ crc oc-env
export PATH="/home/prayag/.crc/bin/oc:$PATH"
# Run this command to configure your shell:
# eval $(crc oc-env)
[prayag@localhost ~]$ 'export PATH="/home/prayag/.crc/bin/oc:$PATH"
[prayag@localhost ~]$ echo 'export PATH="/home/prayag/.crc/bin/oc:$PATH"' >> .bashrc
[prayag@localhost ~]$ which oc
~/.crc/bin/oc/oc
=========================================================
Step 13 - Login as kubeadmin
=========================================================
$ oc login -u kubeadmin -p 6EWtq-5qXX3-Sm3i8-Kr6Gq https://api.crc.testing:644
$ oc get all
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.217.4.1 <none> 443/TCP 15d
service/openshift ExternalName <none> kubernetes.default.svc.cluster.local <none> 15d
$ oc get nodes
NAME STATUS ROLES AGE VERSION
crc-gh9wd-master-0 Ready master,worker 15d v1.23.5+9ce5071
$ oc get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
crc-gh9wd-master-0 Ready master,worker 15d v1.23.5+9ce5071 192.168.126.11 <none> Red Hat Enterprise Linux CoreOS 410.84.202204050541-0 (Ootpa) 4.18.0-305.40.2.el8_4.x86_64 cri-o://1.23.2-4.rhaos4.10.git9ef73d4.el8
========================================
Step 14 - Login as developer
========================================
$ oc login -u developer https://api.crc.testing:6443
Logged into "https://api.crc.testing:6443" as "developer" using existing credentials.
You don't have any projects. You can try to create a new project, by running
oc new-project <projectname>
========================================
Step 15 - Create new project and new app
========================================
$ oc new-project web-app
Now using project "web-app" on server "https://api.crc.testing:6443".
You can add applications to this project with the 'new-app' command. For example, try:
oc new-app rails-postgresql-example
to build a new example application in Ruby. Or use kubectl to deploy a simple Kubernetes application:
kubectl create deployment hello-node --image=k8s.gcr.io/e2e-test-images/agnhost:2.33 -- /agnhost serve-hostname
$ oc new-app --template=openshift/nginx-example --name=nginx-app --param=NAME=nginx-app
$ oc status
In project web-app on server https://api.crc.testing:6443
$ oc get svc
$ oc get route nginx-app
$ curl nginx-app-web-app.apps-crc.testing
$ oc new-app --name=httpd-01 httpd
$ oc get all
$ oc expose service httpd-01
$ oc get all
$ oc get pods
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