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 resources, specifically supporting operations on StatefulSets among other resource types. The "Logs" operation fetches the logs of a specified Kubernetes resource within a given namespace. This is useful for monitoring and debugging applications running in Kubernetes clusters by retrieving their runtime logs.
Practical examples include:
- Fetching logs from a StatefulSet to diagnose issues or verify behavior.
- Monitoring application output or errors without accessing the Kubernetes cluster directly.
- Integrating Kubernetes logs into automated workflows for alerting or analysis.
Properties
| Name | Meaning |
|---|---|
| Namespace | The Kubernetes namespace where the StatefulSet resides. Defaults to "default". |
| Resource Name | The name of the specific StatefulSet resource to retrieve logs from. |
Output
The node outputs JSON data representing the logs retrieved from the specified StatefulSet resource. The exact structure depends on the Kubernetes API response but generally includes log lines or aggregated log content as text.
If binary data were involved (e.g., log files), it would be summarized accordingly; however, this node returns textual log data in JSON format.
Dependencies
- Requires valid Kubernetes API credentials configured in n8n to authenticate and interact with the Kubernetes cluster.
- Depends on the Kubernetes API being accessible and properly configured for the user’s credentials.
- No additional external services are required beyond Kubernetes itself.
Troubleshooting
No credentials got returned!
This error indicates missing or misconfigured Kubernetes API credentials. Ensure that the node has access to valid credentials before execution.Resource not found or incorrect resource name:
If the specified StatefulSet name does not exist in the given namespace, the node will fail to retrieve logs. Verify the resource name and namespace.Permission denied or unauthorized errors:
The credentials used might lack sufficient permissions to read logs from the StatefulSet. Check RBAC settings in Kubernetes.Empty or no logs returned:
The StatefulSet may not have generated logs yet, or logs might have been rotated/deleted. Confirm the pod status and logging configuration.