Which command retrieves logs for a deployment configuration?

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 retrieves logs for a deployment configuration?

Explanation:
In OpenShift, to view the logs associated with a DeploymentConfig you use the logs command with the DeploymentConfig resource type, abbreviated as dc. So you run oc logs dc/<application-name>. This fetches the logs from the pods created by the latest rollout of that deployment configuration. Using the other forms either targets a different resource type (a Deployment) or uses a syntax that isn’t for retrieving logs, so they won’t return the DC’s logs. The short alias dc is the standard and expected way to reference a DeploymentConfig in this context.

In OpenShift, to view the logs associated with a DeploymentConfig you use the logs command with the DeploymentConfig resource type, abbreviated as dc. So you run oc logs dc/. This fetches the logs from the pods created by the latest rollout of that deployment configuration. Using the other forms either targets a different resource type (a Deployment) or uses a syntax that isn’t for retrieving logs, so they won’t return the DC’s logs. The short alias dc is the standard and expected way to reference a DeploymentConfig in this context.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy