What command scales a Deployment to a desired number of replicas?

Prepare for the Red Hat OpenShift Developer II DO288 Exam with our quizzes. Study with flashcards and multiple choice questions, each with hints and explanations. Get ready for your certification!

Multiple Choice

What command scales a Deployment to a desired number of replicas?

Explanation:
Scaling a Deployment means changing how many pod replicas should be running. The command does this by targeting the Deployment resource and setting the desired number of replicas with a flag. The canonical form specifies the resource type and the resource name together, then assigns the number of replicas: oc scale deployment/<name> --replicas=<N>. This directly tells the cluster to adjust the Deployment so that N pods are running. The form that uses a different resource token (deploy) isn’t the correct resource type for a Deployment, so it won’t be valid. Adding a timeout flag isn’t required for the basic scaling action; it only affects how long to wait for the operation to complete, not the actual scaling itself.

Scaling a Deployment means changing how many pod replicas should be running. The command does this by targeting the Deployment resource and setting the desired number of replicas with a flag. The canonical form specifies the resource type and the resource name together, then assigns the number of replicas: oc scale deployment/ --replicas=. This directly tells the cluster to adjust the Deployment so that N pods are running.

The form that uses a different resource token (deploy) isn’t the correct resource type for a Deployment, so it won’t be valid. Adding a timeout flag isn’t required for the basic scaling action; it only affects how long to wait for the operation to complete, not the actual scaling itself.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy