0% found this document useful (0 votes)
278 views

Do280 Scaling An Application

This document outlines steps to demonstrate horizontal pod autoscaling in OpenShift including creating a deployment, scaling the deployment, adding autoscaling, and monitoring the autoscaler and pods. Key steps include creating a new project, deploying a load testing application, scaling the deployment, adding autoscaling based on CPU usage, and monitoring the autoscaler and pods as load is applied.

Uploaded by

Srinivasan
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
278 views

Do280 Scaling An Application

This document outlines steps to demonstrate horizontal pod autoscaling in OpenShift including creating a deployment, scaling the deployment, adding autoscaling, and monitoring the autoscaler and pods. Key steps include creating a new project, deploying a load testing application, scaling the deployment, adding autoscaling based on CPU usage, and monitoring the autoscaler and pods as load is applied.

Uploaded by

Srinivasan
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

lab schedule-scale start

source /usr/local/etc/ocp4.config

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

oc new-project schedule-scale

vim ~/DO280/labs/schedule-scale/loadtest.yaml

resources:
requests:
cpu: "25m"
memory: 25Mi
limits:
cpu: "100m"
memory: 100Mi

oc create --save-config -f ~/DO280/labs/schedule-scale/loadtest.yaml

oc get pods

oc scale --replicas 5 deployment/loadtest

oc get pods

oc scale --replicas 1 deployment/loadtest

oc autoscale deployment/loadtest --min 2 --max 10 --cpu-percent 50

oc get route/loadtest

curl -X GET http://loadtest-schedule-scale.apps.cluster.domain.example.com


/api/loadtest/v1/cpu/1

watch oc get hpa/loadtest

oc get hpa/loadtest

oc new-app --docker-image quay.io/redhattraining/scaling:v1.0

oc expose svc/scaling

oc scale --replicas 3 dc/scaling

oc get pods -o wide -l app=scaling

oc get route/scaling

~/DO280/labs/schedule-scale/curl-route.sh

oc get hpa/loadtest

oc delete project schedule-scale

lab schedule-scale finish

You might also like