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, for the Pods resource and the List operation, it retrieves a list of pods within a specified namespace, optionally filtered by field selectors or label selectors.
Common scenarios where this node is beneficial include:
- Automating monitoring workflows by listing pods to check their status.
- Integrating Kubernetes pod data into other automation pipelines.
- Filtering pods based on labels or fields to target specific subsets of pods.
For example, you can use this node to list all pods in the "default" namespace that have a particular label, such as app=frontend, helping you gather information about frontend application pods dynamically.
Properties
| Name | Meaning |
|---|---|
| Namespace | The Kubernetes namespace from which to list pods. Defaults to "default". |
| Resource Name | (Optional) Specific pod name to filter the list. If provided, the list will be restricted to this pod only. |
| Field Selector | A field selector string to filter pods based on resource fields (e.g., metadata.name=my-pod). See Kubernetes docs for syntax. |
| Label Selector | A label selector string to filter pods based on labels (e.g., app=frontend). See Kubernetes docs for syntax. |
Output
The output is a JSON array containing the pod objects returned by the Kubernetes API according to the applied filters. Each item in the array represents a pod resource with its metadata and status details as provided by Kubernetes.
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to a Kubernetes cluster.
- Needs an API authentication token or credentials configured in n8n to access the Kubernetes API.
- The node depends on a Kubernetes client utility internally to communicate with the cluster.
Troubleshooting
No credentials got returned!
This error indicates missing or misconfigured Kubernetes credentials in n8n. Ensure that the required API authentication token or credential is properly set up and accessible by the node.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.Empty result set
If no pods are returned, confirm that the namespace exists and contains pods matching the selectors. Also, check if the resource name filter is too restrictive.