DCA practice question 24 of 25

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 events deployment api

Full set: 191 questions
Answer options
A: Yes
B: No Correct answer
Correct Answer:
B. No
Explanation

The command kubectl events is not a valid kubectl command. The correct command to list events is kubectl get events. While you can filter events for a specific object using field selectors with kubectl get events, the command as written will produce an "unknown command" error. The standard way to see events for a specific object is kubectl describe.

Why Incorrect

A: This is incorrect because kubectl events is not a recognized command in the kubectl CLI tool. The command will fail to execute.

References

1. Kubernetes Documentation, kubectl Cheat Sheet. The sheet lists kubectl get events for listing events and kubectl describe for showing details, but no kubectl events command exists. https://kubernetes.io/docs/reference/kubectl/cheatsheet/

2. Kubernetes Documentation, kubectl Commands. The official command reference does not list events as a top-level command for kubectl. https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands

Scroll to Top