Lab 9.5 - Create the Deployment using Image from the Registry

1. Login to the cluster as the admin user

oc login -u admin -p rahasia

2. Add the registry-viewer role to the qa-engineer user

oc policy add-role-to-user registry-viewer qa-engineer

3. Add the registry-editor role to the developer user

oc policy add-role-to-user registry-editor developer

4. Login as the developer user

oc login -u developer -p rahasia

5. Create a new project named manage-images

oc new-project manage-images

6. Create a new deployment named hello-world

oc create deployment hello-world \
  --image image-registry.openshift-image-registry.svc:5000/openshift/hello-world
oc get pods

7. Create a service for the application

oc expose deployment/hello-world --port 80 --target-port 8080

8. Make the service accessible by creating a route to it

oc expose svc/hello-world

9. List the routes to view the host/port

oc get routes

10. Try to access the application from the laptop by the URL