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, including StatefulSets. Specifically, the List operation for StatefulSets retrieves a list of StatefulSet resources within a specified namespace, optionally filtered by field selectors or label selectors.
Common scenarios where this node is beneficial include:
- Automating monitoring or auditing of StatefulSets in a Kubernetes cluster.
- Integrating Kubernetes resource data into workflows for reporting or alerting.
- Filtering StatefulSets based on specific criteria such as labels or metadata fields.
For example, you can use this node to list all StatefulSets in the "default" namespace that have a particular label, helping you track stateful applications managed by Kubernetes.
Properties
| Name | Meaning |
|---|---|
| Namespace | The Kubernetes namespace to operate in. Defaults to "default". |
| Resource Name | The name of a specific resource to target. When provided, it filters the results to that exact resource name. |
| Field Selector | A field selector string to filter resources based on their fields (e.g., metadata.name=my-statefulset). See Kubernetes Field Selectors. |
| Label Selector | A label selector string to filter resources based on their labels (e.g., app=nginx). See Kubernetes Labels. |
Output
The output is a JSON array where each item represents a Kubernetes StatefulSet resource matching the query parameters. Each item contains the full Kubernetes resource object as returned by the Kubernetes API, including metadata, spec, and status fields.
No binary data output is produced by this operation.
Dependencies
- Requires an API authentication token or credentials configured in n8n to connect to the Kubernetes cluster.
- The node depends on a Kubernetes client utility internally to communicate with the Kubernetes API.
- Proper RBAC permissions are needed in the Kubernetes cluster to list StatefulSets in the specified namespace.
Troubleshooting
No credentials got returned!
This error indicates missing or misconfigured Kubernetes credentials in n8n. Ensure that valid Kubernetes API credentials are set up and linked to the node.Command must be an array!
Although not relevant for the List operation, this error may appear if using the Run operation with an invalid command format. Commands must be provided as JSON arrays.Permission Denied or Forbidden Errors
If the Kubernetes API returns permission errors, verify that the credentials used have sufficient permissions to list StatefulSets in the target namespace.Empty Results
If no StatefulSets are returned, check that the namespace exists and that any field or label selectors are correctly specified.