Applications are designed and created to meet the demands of customers. They can be scaled up or down based on business needs.
Perform the following steps to scale an application. This example uses hello-openshift.
oc login -u <user name>
oc project <project name>
Now using project "<project name>" on server "https://api.ocp.example.com:6443".
oc get dc
NAME REVISION DESIRED CURRENT TRIGGERED BY
hello-openshift 1 1 1 config,image(hello-openshift:latest)
oc scale --replicas=3 dc/hello-openshift
deploymentconfig.apps.openshift.io/hello-openshift scaled
oc get dc
NAME REVISION DESIRED CURRENT TRIGGERED BY
hello-openshift 1 3 3 config,image(hello-openshift:latest)
Note: OpenShift Container Platform supports the autoscaling of pods if cluster metrics are installed. After installing cluster metrics, run oc autoscale dc/hello-openshift –min=1 --min=10 --cpu-percent=80. The cluster metrics feature is under Technical Preview. For more information, see the Red Hat Custom Metrics documentation.