To view logs for a specific build "name-1" in OpenShift, which command?

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 view logs for a specific build "name-1" in OpenShift, which command?

Explanation:
Viewing logs for a specific build uses the Build resource itself, because the build process runs in its own pod and that pod’s output is what you want to see. The correct command targets the build by its name, for example build/name-1, and streams its log output. BuildConfig (bc/name) is just the template that can trigger builds; it doesn’t contain the build’s log output. Describing the build shows status and metadata, not the log stream. If you want to continuously follow the logs, you can add -f as in oc logs -f build/name-1.

Viewing logs for a specific build uses the Build resource itself, because the build process runs in its own pod and that pod’s output is what you want to see. The correct command targets the build by its name, for example build/name-1, and streams its log output. BuildConfig (bc/name) is just the template that can trigger builds; it doesn’t contain the build’s log output. Describing the build shows status and metadata, not the log stream. If you want to continuously follow the logs, you can add -f as in oc logs -f build/name-1.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy