To stream live logs for the BuildConfig named "name" in OpenShift, which command is used?

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

To stream live logs for the BuildConfig named "name" in OpenShift, which command is used?

Explanation:
Streaming the logs of a BuildConfig is done with the follow option on the oc logs command, targeting the BuildConfig resource. For a BuildConfig named "name," you reference it as bc/name and add -f to continuously output new log lines as the build runs. So the command oc logs -f bc/name follows the latest build of that BuildConfig and streams its logs in real time. The other forms either lack the follow flag, use incorrect resource syntax, or try to target a specific Build resource rather than the BuildConfig.

Streaming the logs of a BuildConfig is done with the follow option on the oc logs command, targeting the BuildConfig resource. For a BuildConfig named "name," you reference it as bc/name and add -f to continuously output new log lines as the build runs. So the command oc logs -f bc/name follows the latest build of that BuildConfig and streams its logs in real time. The other forms either lack the follow flag, use incorrect resource syntax, or try to target a specific Build resource rather than the BuildConfig.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy