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

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
B . No

Answer: B

Explanation:

= The command kubectl events deployment api is not a valid kubectl command. The correct command to display the events for a deployment object is kubectl 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 use kubectl describe deployment api to 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

Latest DCA Dumps Valid Version with 55 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments