DEV Community

Cover image for How to scale an application in OpenShift?
Sagar Jadhav
Sagar Jadhav

Posted on • Edited on • Originally published at developersthought.in

How to scale an application in OpenShift?

Objective

  • Scale up Nginx application using oc scale command
  • Scale up Nginx application by updating DeploymentConfig
  • Scale down Nginx application using oc scale command

Step 1: Deploy Nginx application

Refer User & Project Management blog

Step 2: List pods

oc get pods
Enter fullscreen mode Exit fullscreen mode

Step 3: Scale up Nginx application using oc scale command

oc scale dc nginx --replicas=5
Enter fullscreen mode Exit fullscreen mode
oc get pods --watch
Enter fullscreen mode Exit fullscreen mode

Step 4: Scale up nginx application by updating DeploymentConfig

oc edit dc nginx
Enter fullscreen mode Exit fullscreen mode
update replicas = 7
Enter fullscreen mode Exit fullscreen mode
oc get pods --watch
Enter fullscreen mode Exit fullscreen mode

Step 5: Scale down nginx application using oc scale command

oc scale dc nginx --replicas=1
Enter fullscreen mode Exit fullscreen mode
oc get pods --watch
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay