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)

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay