How to login?
oc login https://api.XXXXXXXXXXXXXX.centralindia.aroapp.io:6443 --username=kubeadmin --password=EgzIY-DJPw2-3NXke-HNYmJ
oc login --token=sha256~LLnTlPcjcNjWsQRqnSyTn99LSvxwQdm47gaiEdZJa20 --server=https://api.XXXXXXXXXXXXXX.centralindia.aroapp.io:6443
curl -H "Authorization: Bearer sha256~LLnTlPcjcNjWsQRqnSyTn99LSvxwQdm47gaiEdZJa20" "https://api.XXXXXXXXXXXXXX.centralindia.aroapp.io:6443/apis/user.openshift.io/v1/users/~

Login to the Web Console and CLI on CRC
crc console --credentials
eval $(crc oc-env)
oc login -u kubeadmin -p <password> --insecure-skip-tls-verify
Copy the admin URL and kubeadmin
credentials β open in browser.
β 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
oc get images
oc new-app --name=my-java-app registry.access.redhat.com/ubi8/openjdk-8-runtime@sha256:00cf28cf9a6c427962f922855a6cc32692c760764ce2ce7411cf605dd510367f
oc expose svc/my-java-app
oc get imagestreams -n openshift
oc new-app --name=my-httpd --image-stream=openshift/httpd
oc expose svc/my-httpd
oc get route my-httpd
Test in browser using the exposed route.
β Step 4: Work with the Developer Console
- Go to the Web Console β Developer View
- Switch to
demo-app
project - Click +Add β Use βContainer Imageβ
- Search for image like
node:latest
,php:8.2-apache
, orquay.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
- Export a deployment:
oc get deployment nginx -o yaml > nginx.yaml
- 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)
- In OperatorHub, install OpenShift Pipelines Operator
- Create:
- PipelineResource
- Task
- Pipeline
- 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:
Feature | CLI Command |
---|---|
List all Pods | oc get pods |
View events | oc get events |
Port Forward | oc port-forward svc/nginx 8080:80 |
RoleBinding | oc adm policy add-role-to-user admin developer |
Enable Dev View | Use 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
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.
Do you want to learn Quantum Computing?
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