⎈ k8s knowledge compiler

kubectl events [page]deterministic

List events

reference

##

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.

``` kubectl events [(-o|--output=)json|yaml|kyaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file] [--for TYPE/NAME] [--watch] [--types=Normal,Warning] ```

##

``` # 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 ```

##

<table style="width: 100%; table-layout: fixed;"> <colgroup> <col span="1" style="width: 10px;" /> <col span="1" /> </colgroup> <tbody>

<tr> <td colspan="2">-A, --all-namespaces</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.</p></td> </tr>

<tr> <td colspan="2">--allow-missing-template-keys&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: true</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>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.</p></td> </tr>

<tr> <td colspan="2">--chunk-size int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: 500</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Return large lists in chunks rather than all at once. Pass 0 to disable.</p></td> </tr>

<tr> <td colspan="2">--for string</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Filter events to only those pertaining to the specified resource.</p></td> </tr>

<tr> <td colspan="2">-h, --help</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>help for events</p></td> </tr>

<tr> <td colspan="2">--no-headers</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>When using the default output format, don't print headers.</p></td> </tr>

<tr> <td colspan="2">-o, --output string</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Output format. One of: (json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).</p></td> </tr>

<tr> <td colspan="2">--show-managed-fields</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>If true, keep the managedFields when printing objects in JSON or YAML format.</p></td> </tr>

<tr> <td colspan="2">--template string</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>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].</p></td> </tr>

<tr> <td colspan="2">--types strings</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Output only events of given types.</p></td> </tr>

<tr> <td colspan="2">-w, --watch</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>After listing the requested events, watch for more events.</p></td> </tr>

</tbody> </table>

##

<table style="width: 100%; table-layout: fixed;"> <colgroup> <col span="1" style="width: 10px;" /> <col span="1" /> </colgroup> <tbody>

<tr> <td colspan="2">--as string</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Username to impersonate for the operation. User could be a regular user or a service account …(trimmed)

Sources

reference/kubectl/generated/kubectl_events/_index.md · dockubectl events

Related (6)

part_of {{% heading "synopsis" %}}describes conf=1
part_of {{% heading "examples" %}}describes conf=1
part_of {{% heading "options" %}}describes conf=1
part_of {{% heading "parentoptions" %}}describes conf=1
part_of {{% heading "seealso" %}}describes conf=1
api_for Eventdocuments API object conf=1

← all Docs