Rancher icon

Rancher

Interact with Rancher/Kubernetes API

Overview

This node allows users to interact with Rancher and Kubernetes APIs to manage various Kubernetes resources, including Jobs. Specifically, for the Job resource with the Create operation, the node enables creating a new Kubernetes Job within a specified cluster, project, and namespace.

Typical use cases include automating batch job creation in Kubernetes clusters managed by Rancher, such as running data processing tasks, scheduled jobs, or any workload that needs to be executed once or on-demand.

For example, you can create a Job to run a containerized script or application in a specific namespace of your Kubernetes environment, specifying the cluster and project context.

Properties

Name Meaning
Cluster Name or ID Select the target Kubernetes cluster by name or ID. You can choose from a list or specify an ID via expression.
Project Name or ID (Optional) Select the project within the cluster by name or ID. Can be chosen from a list or specified via expression.
Namespace Name or ID (Optional) Select the namespace within the project where the Job will be created. Choose from a list or specify via expression.

These properties define the scope and location where the Job resource will be created.

Output

The node outputs JSON data representing the response from the Rancher/Kubernetes API after creating the Job. This typically includes details about the newly created Job resource, such as its metadata, status, and specifications.

No binary data output is indicated for this operation.

Dependencies

  • Requires connection to a Rancher-managed Kubernetes cluster.
  • Needs an API authentication credential configured in n8n to authorize requests to the Rancher/Kubernetes API.
  • The node depends on dynamic loading methods to populate options for clusters, projects, and namespaces.

Troubleshooting

  • Missing or invalid cluster/project/namespace: Ensure that the selected cluster, project, and namespace exist and are accessible with the provided credentials.
  • API authentication errors: Verify that the API key or token used has sufficient permissions to create Jobs in the target cluster.
  • Invalid input parameters: Check that required fields like cluster ID are correctly set and that optional fields, if used, are valid.
  • Network connectivity issues: Confirm that n8n can reach the Rancher API endpoint without firewall or network restrictions.

Common error messages may relate to authorization failures, resource not found, or validation errors from the Kubernetes API. Resolving these usually involves checking credentials, resource identifiers, and API access rights.

Links and References

Discussion