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 various operations such as getting, listing, deleting, running, restarting, executing commands, patching, scaling, and fetching logs of Kubernetes objects. For the DaemonSets resource with the Patch operation, it allows users to apply partial updates to existing DaemonSet resources within a specified namespace.
Common scenarios include:
- Updating container images or configurations in DaemonSets without redeploying them entirely.
- Applying configuration changes or labels selectively to DaemonSets.
- Automating Kubernetes resource management workflows that require dynamic patching of DaemonSets.
Practical example: You have a DaemonSet managing a logging agent across your cluster nodes, and you want to update its container image version. Using this node's Patch operation on DaemonSets, you can specify the new image to update only that part of the DaemonSet spec.
Properties
| Name | Meaning |
|---|---|
| Image | The container image string to use when patching or running pods. |
| Namespace | The Kubernetes namespace where the DaemonSet resource resides. Defaults to "default". |
| Resource Name | The name of the specific DaemonSet resource to patch. |
Note: Although the provided properties JSON includes Image, Namespace, and Resource Name for the Patch operation, the node also supports other parameters like operation (fixed here as "patch") and resource (fixed here as "daemonsets").
Output
The node outputs an array of JSON objects representing the result of the patch operation on the DaemonSet resource. Each output item corresponds to one input item processed.
- The
jsonfield contains the response from the Kubernetes API after applying the patch, typically including the updated DaemonSet resource details. - No binary data output is indicated by the source code.
Dependencies
- Requires valid Kubernetes API credentials configured in n8n to authenticate and authorize requests.
- Depends on the internal Kubernetes client utility (
K8SClient) to communicate with the Kubernetes API server. - The node expects the user to provide correct namespace and resource names matching existing DaemonSets in the cluster.
Troubleshooting
No credentials got returned!
This error occurs if the node cannot retrieve Kubernetes API credentials. Ensure that the credentials are properly set up and linked to the node.Command must be an array!
While not directly related to Patch, this error appears if thecommandparameter is used incorrectly in operations likerun. For Patch, ensure no invalid command input is given.Resource not found or permission denied
If the specified DaemonSet name or namespace does not exist or the credentials lack permissions, the Kubernetes API will return errors. Verify resource existence and credential scopes.Invalid patch format
Since the source code snippet does not show explicit patch payload handling, ensure that the patch data sent via the node matches Kubernetes API expectations (e.g., JSON Patch or Merge Patch formats).