Which command creates a liveness probe for a deployment config "myapp" that uses an Open TCP on port 3306 with a 20-second period and 1-second timeout?

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 creates a liveness probe for a deployment config "myapp" that uses an Open TCP on port 3306 with a 20-second period and 1-second timeout?

Explanation:
Setting up a liveness probe with a TCP check on a port requires using a liveness probe flag together with a TCP port specification and timing options. The command uses --liveness to indicate a liveness probe, and --open-tcp=3306 to perform a TCP check on port 3306. The period option controls how often the probe runs, so --period=20 makes it probe every 20 seconds. The timeout option determines how long to wait for a successful result before failing the probe; --timeout-seconds=1 means it will timeout after 1 second. Putting these together creates a liveness probe for the deployment config myapp that checks TCP connectivity on port 3306 with a 20-second interval and a 1-second timeout. The other choices aren’t correct: one uses a readiness probe instead of a liveness probe, another tries an HTTP GET probe which is not a TCP port check, and the last uses an invalid flag name for the TCP probe.

Setting up a liveness probe with a TCP check on a port requires using a liveness probe flag together with a TCP port specification and timing options. The command uses --liveness to indicate a liveness probe, and --open-tcp=3306 to perform a TCP check on port 3306. The period option controls how often the probe runs, so --period=20 makes it probe every 20 seconds. The timeout option determines how long to wait for a successful result before failing the probe; --timeout-seconds=1 means it will timeout after 1 second. Putting these together creates a liveness probe for the deployment config myapp that checks TCP connectivity on port 3306 with a 20-second interval and a 1-second timeout.

The other choices aren’t correct: one uses a readiness probe instead of a liveness probe, another tries an HTTP GET probe which is not a TCP port check, and the last uses an invalid flag name for the TCP probe.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy