Overview
The node is designed to fetch Kubernetes events from a specified namespace. It supports both listing current events and optionally watching for changes in real-time. This functionality is useful for monitoring cluster activity, debugging issues, or triggering workflows based on specific event occurrences within Kubernetes.
Common scenarios include:
- Retrieving recent events in a namespace to analyze pod lifecycle or deployment status.
- Watching for new events to trigger alerts or automated responses when certain conditions occur.
- Filtering events by labels or fields to focus on relevant resources.
Properties
| Name | Meaning |
|---|---|
| Namespace | The Kubernetes namespace from which to retrieve events (e.g., "default"). |
| Options | A collection of optional parameters to customize the fetch operation: |
| - Allow Watch Bookmarks | Whether to allow watch bookmarks to be sent during watch operations. |
| - Continue | Token to continue retrieving paginated results. |
| - Field Selector | Filter events based on specific field values. |
| - Label Selector | Filter events based on label values. |
| - Limit | Maximum number of events to return (minimum 1, default 50). |
| - Pretty | If true, output will be pretty printed. |
| - Resource Version | Version of the resource to start with for list/watch operations. |
| - Resource Version Match | Determines how the resource version is applied to list/watch operations. |
| - Send Initial Events | For watch operations, whether to send initial events immediately instead of waiting for changes. |
| - Timeout Seconds | Timeout duration for the list or watch call, in seconds (minimum 0). |
| - Watch | Whether to watch for changes to the requested events instead of just listing them. |
Output
The node outputs JSON data representing the fetched Kubernetes events. The structure corresponds to the standard Kubernetes Event API response, typically including metadata about each event such as involved object, reason, message, timestamps, and type.
If the "Watch" option is enabled, the output may stream event updates as they occur.
No binary data output is indicated.
Dependencies
- Requires access to a Kubernetes cluster API.
- Needs appropriate authentication credentials configured in n8n to connect securely to the Kubernetes API server.
- The node depends on internal modules (
./actions/node.descriptionand./actions/router) for its description and routing logic.
Troubleshooting
- Authentication errors: Ensure that the Kubernetes API credentials are correctly set up and have permissions to read events in the specified namespace.
- Timeouts: If the request times out, consider increasing the "Timeout Seconds" option or verify network connectivity to the Kubernetes API.
- Empty results: Check that the namespace exists and contains events; also verify any selectors used for filtering are correct.
- Watch not receiving events: Confirm that the "Watch" option is enabled and that the cluster supports watch operations; also check if "Send Initial Events" is set appropriately.