Which command configures a liveness HTTP health check for deployment config "myapp" with an initial delay of 30 seconds, a single success threshold, and a failure threshold of 3?

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 configures a liveness HTTP health check for deployment config "myapp" with an initial delay of 30 seconds, a single success threshold, and a failure threshold of 3?

Explanation:
Setting a liveness probe with an HTTP health check means OpenShift will periodically query a health endpoint to decide if the container is still able to run. The values you want specify that the checks should start 30 seconds after the container starts, require only one consecutive success to consider the probe healthy, and allow up to three consecutive failures before the container is restarted. The command that matches uses the deployment config myapp, enables a liveness probe, calls the health endpoint via HTTP at port 8080, and sets the exact timing and thresholds: initial delay of 30 seconds, a success threshold of 1, and a failure threshold of 3. Other options either switch to a readiness probe instead of liveness, use different timing values, or use a different flag (such as period) that does not address the requested thresholds, so they don’t meet the given requirements.

Setting a liveness probe with an HTTP health check means OpenShift will periodically query a health endpoint to decide if the container is still able to run. The values you want specify that the checks should start 30 seconds after the container starts, require only one consecutive success to consider the probe healthy, and allow up to three consecutive failures before the container is restarted. The command that matches uses the deployment config myapp, enables a liveness probe, calls the health endpoint via HTTP at port 8080, and sets the exact timing and thresholds: initial delay of 30 seconds, a success threshold of 1, and a failure threshold of 3. Other options either switch to a readiness probe instead of liveness, use different timing values, or use a different flag (such as period) that does not address the requested thresholds, so they don’t meet the given requirements.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy