Rancher icon

Rancher

Interact with Rancher/Kubernetes API

Overview

The node provides integration with Rancher/Kubernetes API to manage Kubernetes cluster resources. Specifically, for the Node resource and the Taint operation, it allows users to add or update taints on a specified Kubernetes node within a cluster.

Taints are key-value pairs with an effect that influence pod scheduling by marking nodes so that pods with matching tolerations can be scheduled accordingly. This is useful in scenarios such as:

  • Preventing certain pods from being scheduled on specific nodes (e.g., nodes reserved for special workloads).
  • Marking nodes as unschedulable for maintenance or other operational reasons.
  • Controlling workload placement based on node conditions or roles.

Practical example: You want to mark a node with a taint key=example.com/special, value=reserved, and effect NoSchedule to prevent regular pods from being scheduled there unless they tolerate this taint.

Properties

Name Meaning
Node ID The unique identifier of the Kubernetes node to which the taints will be applied.
Taints A collection of one or more taints to add or update on the node. Each taint includes:
- Key: The taint key.
- Value: The taint value.
- Effect: The taint effect, one of:
- No Schedule
- Prefer No Schedule
- No Execute
Cluster Name or ID Selects the target 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 context. Can be chosen from a list or specified via expression.

Output

The node outputs JSON data representing the result of the taint operation on the node. This typically includes the updated node object or confirmation details returned by the Rancher/Kubernetes API after applying the taints.

No binary data output is involved in this operation.

Dependencies

  • Requires connection to a Rancher or Kubernetes cluster via an API authentication credential (an API key or token).
  • The node depends on the Rancher/Kubernetes API being accessible and properly configured.
  • Requires n8n credentials setup for Rancher API access.
  • Uses dynamic loading methods to fetch available clusters, projects, and namespaces for selection.

Troubleshooting

  • Invalid Node ID: If the provided node ID does not exist or is incorrect, the API call will fail. Verify the node ID is correct and exists in the selected cluster.
  • Insufficient Permissions: The API credential used must have permissions to modify node taints. Lack of permissions will cause authorization errors.
  • Cluster Connectivity Issues: Ensure the Rancher/Kubernetes cluster is reachable from n8n and the API endpoint is correct.
  • Empty or Malformed Taints: Providing no taints or malformed taint objects may cause the operation to fail. Ensure each taint has a valid key, optional value, and a valid effect.
  • Missing Required Parameters: Node ID and Cluster ID are required; missing these will cause errors.

Common error messages might include "Not Found" for invalid node or cluster IDs, "Unauthorized" for permission issues, or validation errors for taint format problems.

Links and References

Discussion