Editing Kubectl events

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
<code>[[kubectl events]]</code> available since [[v1.28]] (Aug 2023)
+
since v1.28
 
 
* <code>[[Failed]], [[FailedSync]], [[Unhealthy]], [[Killing]]</code>
 
* <code>[[Warning]], [[Normal]]</code>
 
 
 
[[kubectl events --all-namespaces]]
 
[[kubectl events -A -w]]
 
[[kubectl events -A]] | grep Warning
 
[[kubectl events -A]] | Normal
 
 
 
Display events.
 
 
  Prints a table of the most important information about events. You can request events for a namespace, for all namespace, or filtered to only those pertaining to a specified resource.
 
 
Examples:
 
  # List recent events in the default namespace
 
  kubectl events
 
 
 
  # List recent events in all namespaces
 
  kubectl events --all-namespaces
 
 
 
  # List recent events for the specified pod, then wait for more events and list them as they arrive
 
  kubectl events --for pod/web-pod-13je7 --watch
 
 
 
  # List recent events in YAML format
 
  kubectl events -oyaml
 
 
 
  # List recent only events of type 'Warning' or 'Normal'
 
  kubectl events --types=Warning,Normal
 
 
Options:
 
    -A, --all-namespaces=false:
 
If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.
 
 
    --allow-missing-template-keys=true:
 
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
 
 
    --chunk-size=500:
 
Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is beta and may change in the future.
 
 
    --for='':
 
Filter events to only those pertaining to the specified resource.
 
 
    --no-headers=false:
 
When using the default output format, don't print headers.
 
 
    -o, --output='':
 
Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).
 
 
    --show-managed-fields=false:
 
If true, keep the managedFields when printing objects in JSON or YAML format.
 
 
    --template='':
 
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
 
 
    --types=[]:
 
Output only events of given types.
 
 
    -w, --watch=false:
 
After listing the requested events, watch for more events.
 
 
Usage:
 
  kubectl events [(-o|--output=)json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file] [--for TYPE/NAME] [--watch] [--types=Normal,Warning] [options]
 
 
Use "kubectl options" for a list of global command-line options (applies to all commands).
 
 
 
  
  
Line 73: Line 8:
 
== Related ==
 
== Related ==
 
* <code>[[kubectl get events]]</code>
 
* <code>[[kubectl get events]]</code>
* [[Kubernetes troubleshooting]]
 
  
 
== See also ==
 
== See also ==

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: