nerdexam
Docker

DCA · Question #117

You are troubleshooting a Kubernetes deployment called api, and want to see the events table for this object. Does this command display it? Solution: kubectl logs deployment api

The correct answer is B. No. The kubectl logs command retrieves output from a container's stdout/stderr, not Kubernetes object events.

Submitted by kev92· Apr 18, 2026Container Orchestration

Question

You are troubleshooting a Kubernetes deployment called api, and want to see the events table for this object. Does this command display it? Solution: kubectl logs deployment api

Options

  • AYes
  • BNo

How the community answered

(42 responses)
  • A
    5% (2)
  • B
    95% (40)

Why each option

The `kubectl logs` command retrieves output from a container's stdout/stderr, not Kubernetes object events.

AYes

`kubectl logs` shows application output from containers, not system-level events for Kubernetes resources.

BNoCorrect

The `kubectl logs` command is used to stream or retrieve logs from containers running within a pod, not to display events related to a Kubernetes object like a Deployment. Kubernetes events provide a high-level timeline of what has happened to an object.

Concept tested: Kubernetes object events vs. container logs

Source: https://kubernetes.io/docs/reference/kubectl/cheatsheet/#inspecting-and-debugging

Topics

#kubectl#Kubernetes Deployments#Kubernetes Events#Troubleshooting

Community Discussion

No community discussion yet for this question.

Full DCA Practice