Rancher27 icon

Rancher27

Interact with Rancher/Kubernetes API

Actions40

Overview

This node integrates with Rancher and Kubernetes APIs to manage various Kubernetes resources, including nodes. Specifically for the Node resource with the Cordon operation, it marks a specified Kubernetes node as unschedulable. This prevents new pods from being scheduled on that node, which is useful during maintenance or troubleshooting.

Common scenarios where this node is beneficial include:

  • Preparing a node for maintenance by preventing new workloads.
  • Managing cluster capacity by controlling which nodes can accept new pods.
  • Automating cluster management workflows that require temporarily isolating nodes.

Example use case: Before performing hardware upgrades on a node, you can cordon it to ensure no new pods are assigned there, minimizing disruption.

Properties

Name Meaning
Node ID The unique identifier of the Kubernetes node to operate on.
Cluster Name or ID Select or specify the target Kubernetes cluster where the node resides.
Project Name or ID Select or specify the project within the cluster context.
Namespace Name or ID Select or specify the namespace context (though for node operations, namespace may be less relevant).

These properties are required to identify the exact node and cluster context for the cordon operation.

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 confirmation details returned by the Rancher/Kubernetes API indicating the node is now marked unschedulable.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to a Rancher/Kubernetes API endpoint.
  • Needs an API authentication token or key configured in n8n credentials to authorize requests.
  • The node depends on the availability of the specified cluster, project, and node identifiers.
  • The node uses internal methods to load options dynamically for clusters, projects, and namespaces.

Troubleshooting

  • Common issues:

    • Invalid or missing node ID will cause the operation to fail.
    • Incorrect cluster or project selection may lead to "resource not found" errors.
    • Insufficient permissions or invalid API credentials can cause authorization failures.
    • Network connectivity issues to the Rancher/Kubernetes API endpoint.
  • Error messages:

    • "Node not found": Verify the node ID and cluster/project selections.
    • "Unauthorized": Check API credentials and permissions.
    • "Failed to mark node as unschedulable": Ensure the node is in a valid state and the API server is reachable.

Resolving these usually involves verifying input parameters, checking API credentials, and ensuring network access.

Links and References

Discussion