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 Namespaces resource and the Logs operation, it retrieves logs from a specified namespace and resource name (e.g., pod). This is useful for monitoring and debugging applications running in Kubernetes by fetching their runtime logs.
Common scenarios include:
- Fetching logs of a pod within a specific namespace to diagnose issues.
- Monitoring application output or errors without accessing the Kubernetes cluster directly.
- Automating log retrieval as part of CI/CD pipelines or alerting workflows.
Example: Retrieve logs from a pod named my-app-pod in the default namespace to analyze recent events or errors.
Properties
| Name | Meaning |
|---|---|
| Namespace | The Kubernetes namespace where the target resource resides. Defaults to "default". |
| Resource Name | The name of the specific resource (e.g., pod) from which to retrieve logs. |
Output
The node outputs JSON data representing the logs retrieved from the specified Kubernetes resource within the given namespace. The exact structure depends on the Kubernetes API response but generally includes log lines or aggregated log content.
If binary data were involved (e.g., raw log files), it would be indicated here, but this node returns textual log data in JSON format.
Dependencies
- Requires valid Kubernetes API credentials configured in n8n to authenticate and communicate with the Kubernetes cluster.
- The node uses an internal Kubernetes client utility (
K8SClient) to perform API calls. - No additional external services are required beyond access to the Kubernetes cluster.
Troubleshooting
No credentials got returned!
This error indicates missing or misconfigured Kubernetes API credentials. Ensure that the node has proper authentication set up to connect to your Kubernetes cluster.Command must be an array!
Although not relevant for the Logs operation, this error may appear if other operations likerunprovide invalid command input. For Logs, ensure you do not mistakenly configure command parameters.Resource not found or empty logs
If no logs are returned, verify that the resource name and namespace are correct and that the resource is currently running and producing logs.API connectivity issues
Network problems or incorrect cluster endpoint configurations can cause failures. Confirm network access and credential validity.