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, specifically allowing users to perform various operations on Kubernetes resources such as Pods. For the Pods - Get operation, it retrieves information about one or more pods within a specified namespace. This is useful for monitoring pod status, inspecting pod details, or integrating Kubernetes data into workflows.
Common scenarios include:
- Fetching details of a specific pod by name.
- Listing pods filtered by labels or fields to monitor application deployments.
- Automating checks on pod states before proceeding with other workflow steps.
Example: Retrieve detailed information about a pod named "my-app-pod" in the "default" namespace to verify its current status and metadata.
Properties
| Name | Meaning |
|---|---|
| Namespace | The Kubernetes namespace where the pod(s) reside. Defaults to "default". |
| Resource Name | The exact name of the pod to retrieve. If provided, the node fetches that specific pod; otherwise, it can return multiple pods matching selectors. |
| Field Selector | A field selector string to filter pods based on their fields (e.g., metadata.name=my-pod). Useful for precise filtering. See Kubernetes Field Selectors. |
| Label Selector | A label selector string to filter pods based on their labels (e.g., app=nginx). Useful for selecting pods belonging to a particular application or deployment. See Kubernetes Labels. |
Output
The output is a JSON array containing the retrieved pod information. Each item corresponds to a pod object returned from the Kubernetes API, including metadata, status, spec, and other relevant pod details.
The structure typically matches the Kubernetes Pod resource schema, for example:
[
{
"metadata": {
"name": "my-app-pod",
"namespace": "default",
"labels": { "app": "my-app" },
...
},
"spec": { ... },
"status": { ... }
}
]
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to a Kubernetes cluster.
- Needs valid Kubernetes API credentials configured in n8n (an API key or token with appropriate permissions).
- The node uses an internal Kubernetes client utility to communicate with the cluster.
Troubleshooting
No credentials got returned!
This error indicates missing or misconfigured Kubernetes credentials. Ensure that the API authentication token or key is properly set up in n8n credentials.Command must be an array! (not applicable for Get operation but present in code)
When running commands (in other operations), ensure the command input is a valid JSON array.Empty or no pods returned:
Verify the namespace, resource name, and selectors are correct. Incorrect filters may result in no matching pods.Permission denied or unauthorized errors:
Check that the Kubernetes credentials have sufficient RBAC permissions to read pods in the specified namespace.