Actions54
- Namespace Actions
- Deployment Actions
- Service Actions
- Pod Actions
- StatefulSet Actions
- ConfigMap Actions
- Secret Actions
- Job Actions
- CronJob Actions
- Node Actions
- Workload Actions
Overview
This node integrates with the Rancher/Kubernetes API to manage Kubernetes cluster resources programmatically within n8n workflows. Specifically, for the Node resource and the Cordon operation, it marks a Kubernetes node as unschedulable. This means that no new pods will be scheduled on the node, which is useful when preparing a node for maintenance or decommissioning.
Common scenarios where this node is beneficial include:
- Temporarily preventing workloads from being assigned to a node during upgrades or troubleshooting.
- Managing cluster capacity by controlling which nodes can accept new pods.
- Automating cluster maintenance workflows by cordoning nodes before draining or updating them.
Example use case:
- An automated workflow that cordons a node before triggering a drain operation to safely migrate pods off the node.
Properties
Name | Meaning |
---|---|
Node ID | The unique identifier of the Kubernetes node to cordon (mark as unschedulable). |
Cluster Name or ID | Selects the Kubernetes cluster where the node resides. Can be chosen from a list or specified via expression. |
Project Name or ID | (Optional) Selects the project within the cluster context. Can be chosen from a list or specified via expression. |
Namespace Name or ID | (Optional) Selects the namespace within the project. Can be chosen from a list or specified via expression. |
Output
The node outputs JSON data representing the result of the cordon operation on the specified node. This typically includes the updated node object or status information returned by the Rancher/Kubernetes API confirming the node has been marked unschedulable.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to a Rancher or Kubernetes cluster via an API key credential configured in n8n.
- The node depends on the Rancher/Kubernetes API being accessible and properly authenticated.
- The cluster, project, and optionally namespace must exist and be accessible with the provided credentials.
Troubleshooting
Common issues:
- Invalid or missing Node ID: The operation requires a valid node identifier; ensure the correct node ID is provided.
- Authentication failures: Verify that the API key credential is correctly set up and has sufficient permissions.
- Network connectivity problems: Ensure n8n can reach the Rancher/Kubernetes API endpoint.
- Insufficient permissions: The API token must have rights to modify node scheduling state.
Error messages:
- "Node not found" or similar indicates the specified node ID does not exist in the selected cluster/project/namespace.
- "Unauthorized" or "Forbidden" errors suggest permission issues with the API credentials.
- Timeout or connection errors indicate network or API availability problems.
Resolving these usually involves verifying input parameters, checking credentials, and ensuring network access.
Links and References
- Kubernetes Documentation on Cordoning Nodes
- Rancher API Documentation
- n8n Expressions Documentation (for dynamic property values)