Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Do280 Manually Scaling An OpenShift Cluster

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

lab scale-manual start

source /usr/local/etc/ocp4.config

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

oc get machinesets -n openshift-machine-api

oc edit machineset ocp-qz7hf-worker-us-west-1b -n openshift-machine-api

labels:
env: prod

oc scale machineset ocp-qz7hf-worker-us-west-1b --replicas 3 -n openshift-machine-


api

oc get machines -n openshift-machine-api -o wide -l machine.openshift.io/cluster-


api-machine-role=worker

oc label node node1.us-west-1.compute.internal env=prod

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

oc adm new-project scale-manual --node-selector env=prod

oc adm policy add-role-to-user edit developer -n scale-manual

oc login -u developer -p ${RHT_OCP4_USER_PASSWD}

oc project scale-manual

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

oc scale --replicas 6 deployment/manual

oc get pods -o wide

oc login -u admin -p ${RHT_OCP4_USER_PASSWD}

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

oc describe node node3.us-west-1.compute.internal

oc delete project scale-manual

oc get machinesets -n openshift-machine-api

oc scale machineset ocp-qz7hf-worker-us-west-1b --replicas 2 -n openshift-machine-


api

oc edit machineset ocp-qz7hf-worker-us-west-1b -n openshift-machine-api

remove

labels:
env: prod

oc label nodes -l env env


lab scale-manual finish

You might also like