Skip to content

maximilianoPizarro/testing-cpu-based-hpa-ocp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Testing CPU-Based Horizontal Pod Autoscaling on OpenShift

Redhat OpenShift Kubernetes Shell LinkedIn

Prerequisites


Hands-on Developer Sandbox

Step 1: Log in to Developer Sandbox

Log in with your Red Hat Account.

Step 2: Add a New Application

From the Developer perspective, click on the +Add button.

Step 2

Step 3: Create an Application from a Code Sample

Go to Samples and select "Create an application from a code sample."

Step 3

Step 4: Select .NET Builder Images Sample

Choose the .NET Builder Images Sample.

Step 4

Step 5: Create the Application

Review the repository and click Create.

Step 5

Step 6: Check the Topology Section

Wait for the pod to be ready in the Topology section.

Step 6


Configure Resource Limits and HPA

Step 7: Edit Resource Limits

From the dotnet-sample deployment, click Actions > Edit resource limits.

Step 7

Step 8: Configure Resource Limits

Set the resource limits and requests, then click Save.

Step 8

Step 9: Add Horizontal Pod Autoscaler

From the dotnet-sample deployment, click Actions > Add HorizontalPodAutoscaler.

Step 9

Step 10: Set CPU Utilization

Set the CPU Utilization to 5% and click Save.

Step 10


Test the HPA

Step 11: Open OpenShift Terminal

Initialize the terminal with your project and click Start.

Step 11

Step 12: Run the Test Script

a. Clone the Repository

git clone https://github.com/maximilianoPizarro/testing-cpu-based-hpa-ocp.git

b. Add chmod permission for test-hpa.sh script.

chmod 777 ./testing-cpu-based-hpa-ocp/test-hpa.sh

c. Run test-hpa.sh script.

./testing-cpu-based-hpa-ocp/test-hpa.sh

Step 13: Look at the HPA in action.

Step 11


Build Here, Go Anywhere

About

Testing cpu-based horizontal pod autoscaling on OpenShift

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages