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 DaemonSets. Specifically for the Restart operation on DaemonSets, it allows users to trigger a restart of the targeted DaemonSet within a specified namespace.
Common scenarios where this node is beneficial include:
- Automating the restart of DaemonSets after configuration changes or updates.
- Managing Kubernetes workloads programmatically without direct kubectl usage.
- Integrating Kubernetes resource management into broader automation workflows.
For example, you might use this node to restart a DaemonSet running a logging agent across your cluster nodes whenever you deploy a new configuration.
Properties
| Name | Meaning |
|---|---|
| Image | The container image to use when running or restarting pods (required for some operations). |
| Namespace | The Kubernetes namespace where the DaemonSet resides. Defaults to "default". |
| Resource Name | The name of the specific DaemonSet resource to target for the operation. |
Output
The node outputs JSON data representing the result of the executed operation. For the Restart operation on DaemonSets, the output typically includes status information about the restart action performed on the resource.
If the operation involves running pods or commands (e.g., run, exec), the output may include standard output (stdout) from those pods.
No binary data output is indicated in the source code.
Dependencies
- Requires valid Kubernetes API credentials configured in n8n to authenticate and interact with the Kubernetes cluster.
- The node depends on an internal Kubernetes client utility (
K8SClient) to perform API calls. - No external services beyond the Kubernetes API are required.
Troubleshooting
No credentials got returned!
This error occurs if the node cannot retrieve the necessary Kubernetes API credentials. Ensure that the credentials are properly set up and linked to the node.Command must be an array!
When using operations that require a command input (likerun), the command must be provided as a JSON array. Providing a string or other format will cause this error.If the restart does not take effect, verify that the specified DaemonSet name and namespace are correct and that the user has sufficient permissions in the Kubernetes cluster.