ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 74 - DCA discussion

Report
Export

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

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: B

Explanation:

= The commandkubectl events deployment apiis not a valid kubectl command.The correct command to display the events for a deployment object iskubectl get events --field-selector involvedObject.name=api12. This command uses a field selector to filter the events by the name of the involved object, which is the deployment called api.Alternatively, you can usekubectl describe deployment apito see the details and the events for the deployment3.Reference:

1: kubectl Cheat Sheet | Kubernetes

2: kubernetes - kubectl get events only for a pod - Stack Overflow

3: Kubectl: Get Events & Sort By Time - ShellHacks

asked 08/11/2024
Chris Bezuidenhout
39 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first