Which command enables horizontal pod autoscaling for a deployment config named frontend with min 1, max 5, cpu-percent 80?

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

Which command enables horizontal pod autoscaling for a deployment config named frontend with min 1, max 5, cpu-percent 80?

Explanation:
Horizontal pod autoscaling adjusts the number of running pods based on CPU utilization, within a defined minimum and maximum range. For a deployment config named frontend, the command uses the resource type for deployment configs (dc), then specifies the minimum and maximum replica counts and the target CPU utilization with the cpu-percent flag. This exact combination—oc autoscale dc/frontend --min=1 --max=5 --cpu-percent=80—tells OpenShift to keep between 1 and 5 pods and to scale when the average CPU across pods reaches 80%. The other options fail because they either use an incorrect resource type (deployment instead of deployment config), use an incorrect flag (--cpu instead of --cpu-percent), or set an invalid range by putting min higher than max.

Horizontal pod autoscaling adjusts the number of running pods based on CPU utilization, within a defined minimum and maximum range. For a deployment config named frontend, the command uses the resource type for deployment configs (dc), then specifies the minimum and maximum replica counts and the target CPU utilization with the cpu-percent flag. This exact combination—oc autoscale dc/frontend --min=1 --max=5 --cpu-percent=80—tells OpenShift to keep between 1 and 5 pods and to scale when the average CPU across pods reaches 80%. The other options fail because they either use an incorrect resource type (deployment instead of deployment config), use an incorrect flag (--cpu instead of --cpu-percent), or set an invalid range by putting min higher than max.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy