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 questionsThe 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.
A: This is incorrect because kubectl events is not a recognized command in the kubectl CLI tool. The command will fail to execute.
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
Keep practicing
Take the free DCA practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DCA practice questions
- Question 1Does this command create a swarm service that only listens on port 53 using the UDP proto…
- Question 2Will this command ensure that overlay traffic between service tasks is encrypted? Solutio…
- Question 4Does this describe the role of Control Groups (cgroups) when used with a Docker container…
- Question 5Can this set of commands identify the published port(s) for a container? Solution: docker…
- Question 6Will this command mount the host's '/data' directory to the ubuntu container in read-only…
- Question 7A company's security policy specifies that development and production containers must run…
