Which command sets a liveness probe on a deploymentconfig with initial delay, timeout, and URL?

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 sets a liveness probe on a deploymentconfig with initial delay, timeout, and URL?

Explanation:
The command to configure a liveness probe requires specifying the probe type, plus the timing controls and the endpoint to check. You want a liveness probe, so you use --liveness. You also need an initial delay before probes start (--initial-delay-seconds), a per-probe timeout (--timeout-seconds), and the HTTP endpoint to hit (--get-url). That combination is what ensures OpenShift will first wait a bit, then periodically fetch the given URL and fail the container if the response isn’t healthy within the timeout. So the correct form is: oc set probe dc/<name> --liveness --initial-delay-seconds=<num> --timeout-seconds=<num> --get-url=<endpoint>. The other options don’t fit because one sets a readiness probe instead of liveness, one uses an incorrect flag for the delay and omits the timeout, and another lacks the timeout while including the URL.

The command to configure a liveness probe requires specifying the probe type, plus the timing controls and the endpoint to check. You want a liveness probe, so you use --liveness. You also need an initial delay before probes start (--initial-delay-seconds), a per-probe timeout (--timeout-seconds), and the HTTP endpoint to hit (--get-url). That combination is what ensures OpenShift will first wait a bit, then periodically fetch the given URL and fail the container if the response isn’t healthy within the timeout.

So the correct form is: oc set probe dc/ --liveness --initial-delay-seconds= --timeout-seconds= --get-url=.

The other options don’t fit because one sets a readiness probe instead of liveness, one uses an incorrect flag for the delay and omits the timeout, and another lacks the timeout while including the URL.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy