

========================================================= | |
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 |
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND