Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions pages/common/kubectl-events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# kubectl events

> List and watch events in the cluster.
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_events/>.

- List recent events in the default namespace:

`kubectl events`

- List events for all namespaces:

`kubectl events --all-namespaces`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`kubectl events --all-namespaces`
`kubectl events {{[-A|--all-namespaces]}}`


- List events for a specific namespace:

`kubectl events --namespace {{namespace_name}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`kubectl events --namespace {{namespace_name}}`
`kubectl events {{[-n|--namespace]}} {{namespace_name}}`


- List events for a specific object:

`kubectl events --for {{pod}}/{{pod_name}}`

- Watch for new events in real-time:

`kubectl events --watch`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`kubectl events --watch`
`kubectl events {{[-w|--watch]}}`


- List events and filter by type (Normal or Warning):

`kubectl events --types {{Warning}}`