Actions90
- Jobs Actions
- Namespaces Actions
- Pods Actions
- Services Actions
- Deployments Actions
- ReplicaSets Actions
- StatefulSets Actions
- DaemonSets Actions
- CronJobs Actions
Overview
This node enables interaction with Kubernetes clusters by performing various operations on Kubernetes resources. Specifically, the List operation retrieves a list of resources (such as pods, services, deployments, etc.) from a specified namespace, optionally filtered by field selectors or label selectors.
Common scenarios where this node is useful include:
- Monitoring and managing Kubernetes resources programmatically.
- Automating workflows that require querying the current state of Kubernetes objects.
- Integrating Kubernetes resource data into broader automation pipelines.
For example, you could use this node to list all pods in the "default" namespace that match certain labels, then trigger further actions based on their status.
Properties
| Name | Meaning |
|---|---|
| Namespace | The Kubernetes namespace from which to list resources. Defaults to "default". |
| Resource Name | An optional specific resource name to filter by. If provided, it overrides the field selector to target that exact resource name. |
| Field Selector | A Kubernetes field selector string to filter resources by specific fields (e.g., metadata.name=my-pod). See Kubernetes Field Selectors. |
| Label Selector | A Kubernetes label selector string to filter resources by labels (e.g., app=nginx). See Kubernetes Labels. |
Output
The output is a JSON array representing the list of Kubernetes resources retrieved according to the specified filters. Each item corresponds to a Kubernetes resource object with its metadata and spec/status details as returned by the Kubernetes API.
No binary data output is produced by this operation.
Dependencies
- Requires valid Kubernetes API credentials configured in n8n to authenticate and communicate with the Kubernetes cluster.
- The node depends on an internal Kubernetes client utility to perform API requests.
- No additional external services are required beyond access to the Kubernetes API endpoint.
Troubleshooting
No credentials got returned!
This error indicates missing or misconfigured Kubernetes API credentials. Ensure that the node has proper credentials set up with sufficient permissions to list resources in the target namespace.Invalid field selector or label selector syntax
If filtering returns no results or errors, verify that the selectors conform to Kubernetes syntax rules. Refer to the official Kubernetes documentation for correct usage.Resource not found or permission denied
Confirm that the specified namespace and resource type exist and that the credentials have read access to them.