loading...
Cover image for How to scale an application in OpenShift?

How to scale an application in OpenShift?

sagarjadhv23 profile image Sagar Jadhav Updated on ・1 min read

OpenShift Essentials (8 Part Series)

1) How to manage Users & Project in Openshift? 2) How to create route in OpenShift? 3 ... 6 3) How to scale an application in OpenShift? 4) How to use Persistent Storage in OpenShift? 5) How to deploy application using Source to Image (S2I) in OpenShift? 6) How to monitor application using probes in OpenShift? 7) How to limit resources using Quotas & Limit Ranges in OpenShift? 8) How to deploy an application using Templates 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

Step 3: Scale up Nginx application using oc scale command

oc scale dc nginx --replicas=5
oc get pods --watch

Step 4: Scale up nginx application by updating DeploymentConfig

oc edit dc nginx
update replicas = 7
oc get pods --watch

Step 5: Scale down nginx application using oc scale command

oc scale dc nginx --replicas=1
oc get pods --watch

Discussion

markdown guide