ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 109 - 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 get deployment api

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: B

Explanation:

The commandkubectl get deployment apiwill only show the status of the deployment object, such as the number of replicas, available pods, and updated pods1.It will not display the events table for the deployment, which contains information about the creation, scaling, and updating of the deployment and its pods2.To see the events table for the deployment, you need to use thekubectl describe deployment apicommand, which will show the details of the deployment object, including the events3.Alternatively, you can use thekubectl get events --field-selector involvedObject.name=apicommand, which will filter the events by the name of the involved object4.Reference:

Kubectl: Get Deployments - Kubernetes - ShellHacks

Events in Kubernetes | Kubernetes

kubectl Cheat Sheet | Kubernetes

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

asked 08/11/2024
Mercedes Gonzalez Riera
39 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first