[go: up one dir, main page]

0% found this document useful (0 votes)
72 views2 pages

Pod Scheduling Behavior

The document outlines a series of OpenShift commands for managing a project called 'schedule-pods'. It includes steps for creating a deployment, exposing services, scaling replicas, labeling nodes, and managing user logins. The document concludes with commands to delete the project and finish the lab session.

Uploaded by

Srinivasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views2 pages

Pod Scheduling Behavior

The document outlines a series of OpenShift commands for managing a project called 'schedule-pods'. It includes steps for creating a deployment, exposing services, scaling replicas, labeling nodes, and managing user logins. The document concludes with commands to delete the project and finish the lab session.

Uploaded by

Srinivasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

lab schedule-pods start

source /usr/local/etc/ocp4.config

oc login -u developer -p ${RHT_OCP4_USER_PASSWD} ${RHT_OCP4_MASTER_API}

oc new-project schedule-pods

oc create deployment hello --image quay.io/redhattraining/hello-world-nginx:v1.0

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

oc expose svc/hello

oc scale --replicas 4 deployment/hello

oc get pods -o wide

oc login -u admin -p ${RHT_OCP4_USER_PASSWD}

oc get machines -n openshift-machine-api -o wide

oc get machinesets -n openshift-machine-api

oc get nodes -L env -l node-role.kubernetes.io/worker

oc label node ip-10-0-140-20.us-east-2.compute.internal env=dev

oc label node ip-10-0-152-96.us-east-2.compute.internal env=prod

oc get nodes -L env -l node-role.kubernetes.io/worker

oc login -u developer -p ${RHT_OCP4_USER_PASSWD}

oc edit deployment/hello

oc get pods -o wide

oc delete project schedule-pods

oc login -u admin -p ${RHT_OCP4_USER_PASSWD}

oc label node -l node-role.kubernetes.io/worker env-

oc login -u developer -p ${RHT_OCP4_USER_PASSWD}

oc project schedule-pods-ts

oc get pods

oc describe pod hello-ts-5dbff9f44-8h7c7

oc edit deployment/hello-ts

oc get pods

lab schedule-pods finish

You might also like