Which command would you use to inspect logs for a BuildConfig build?

Prepare for the Red Hat Openshift Developer EX288 Exam. Study with comprehensive quizzes and flashcards. Each question includes hints and explanations to enhance your understanding. Ace your exam with confidence!

Multiple Choice

Which command would you use to inspect logs for a BuildConfig build?

Explanation:
To view the runtime output of a BuildConfig build, you want the log stream tied to that specific BuildConfig. Using oc logs bc/<build> retrieves the logs for the build associated with that BuildConfig, giving you the live or completed build output in one place. You can add --follow to stream in real time or --previous to see logs from a previous build. The other options don’t fetch the build logs directly: describing the BuildConfig shows configuration and status, not the build output; listing BuildConfigs does not show logs; and targeting a specific build pod requires knowing the pod name, whereas using the BuildConfig resource name is the standard, straightforward way to access the build’s logs.

To view the runtime output of a BuildConfig build, you want the log stream tied to that specific BuildConfig. Using oc logs bc/ retrieves the logs for the build associated with that BuildConfig, giving you the live or completed build output in one place. You can add --follow to stream in real time or --previous to see logs from a previous build.

The other options don’t fetch the build logs directly: describing the BuildConfig shows configuration and status, not the build output; listing BuildConfigs does not show logs; and targeting a specific build pod requires knowing the pod name, whereas using the BuildConfig resource name is the standard, straightforward way to access the build’s logs.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy