-
Notifications
You must be signed in to change notification settings - Fork 2
Lab‐4: Deploy a simple web based application with non root privilege
STEP-1 Create a namespace/project to deploy the application
[student@servera ~]$ oc create namespace test100
STEP-2 Switch to test100 namespace.
[student@servera ~]$ oc config set-context --namespace test100 --current
STEP-3 Ensure that you are in test100 project/namespace.
[student@servera ~]$ oc project
STEP-4 Create a test1 deployment resource.
[student@servera ~]$ oc create deployment test1 --image quay.io/anandpavithran/infosys:2.0
STEP-5 List resources created.
[student@servera ~]$ oc get all
STEP-6 Create a service and list resources.
[student@servera ~]$ oc create service clusterip test1 --tcp=8080:8080
[student@servera ~]$ oc get all
STEP-7 Expose the application to the outside world and check the route resource.
[student@servera ~]$ oc expose svc test1
[student@servera ~]$ oc get all
STEP-8 Test the application.
[student@servera ~]$ curl http://test1-test100.apps.example.com
STEP-9 Delete the test100 project/namespace.
[student@servera ~]$ oc delete namespace test100