The command kubectl get deployment api will 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 the kubectl describe deployment api command, which will show the details of the deployment object, including the events3. Alternatively, you can use the kubectl get events --field-selector involvedObject.name=api command, which will filter the events by the name of the involved object4. References:
Kubectl: Get Deployments - Kubernetes - ShellHacks
Events in Kubernetes | Kubernetes
kubectl Cheat Sheet | Kubernetes
kubernetes - kubectl get events only for a pod - Stack Overflow
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit