DCA · Question #118
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
The correct answer is B. No. The kubectl events command does not exist in Kubernetes; events for an object are typically viewed using kubectl describe or kubectl get events.
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 events deployment api
Options
- AYes
- BNo
How the community answered
(59 responses)- A5% (3)
- B95% (56)
Why each option
The `kubectl events` command does not exist in Kubernetes; events for an object are typically viewed using `kubectl describe` or `kubectl get events`.
The `kubectl events` command is not a valid Kubernetes command for viewing object events.
There is no standard `kubectl events` command to display events for a specific Kubernetes object. To view events related to a Deployment, one would typically use `kubectl describe deployment api` or `kubectl get events --field-selector involvedObject.name=api,involvedObject.kind=Deployment`.
Concept tested: Kubernetes event inspection
Source: https://kubernetes.io/docs/reference/kubectl/cheatsheet/#inspecting-and-debugging
Topics
Community Discussion
No community discussion yet for this question.