Rancher icon

Rancher

Interact with Rancher/Kubernetes API

Overview

This node enables interaction with Rancher and Kubernetes APIs to manage various Kubernetes resources, including Jobs. Specifically, the Job - Get operation retrieves information about one or more Kubernetes Jobs within a specified cluster, project, and namespace.

Common scenarios for using this node include:

  • Monitoring batch jobs running in a Kubernetes cluster.
  • Fetching job status and metadata for automation workflows.
  • Integrating Kubernetes job data into broader automation pipelines.

For example, you can use this node to get details of all jobs in a particular namespace or retrieve a specific job by its ID to check its completion status or logs.

Properties

Name Meaning
Cluster Name or ID Select the Kubernetes cluster where the Job resides. You can choose from a list or specify an ID via expression.
Project Name or ID (Optional) Select the project within the cluster. Choose from a list or specify an ID via expression.
Namespace Name or ID (Optional) Select the namespace within the project. Choose from a list or specify an ID via expression.

These properties define the scope for retrieving Job resources.

Output

The node outputs JSON data representing the retrieved Job(s). The structure typically includes standard Kubernetes Job fields such as metadata (name, labels, annotations), spec (job configuration), and status (completion, conditions, active pods).

Example output JSON snippet might look like:

{
  "metadata": {
    "name": "example-job",
    "namespace": "default",
    "labels": { ... },
    "annotations": { ... }
  },
  "spec": {
    "template": { ... },
    "backoffLimit": 4,
    ...
  },
  "status": {
    "active": 1,
    "succeeded": 0,
    "failed": 0,
    ...
  }
}

No binary data output is produced by this operation.

Dependencies

  • Requires connection to a Rancher or Kubernetes API endpoint.
  • Needs an API authentication token or key configured in n8n credentials to authorize requests.
  • The node depends on dynamic loading methods to populate options for clusters, projects, and namespaces.

Troubleshooting

  • Missing or invalid cluster/project/namespace IDs: Ensure that the selected cluster, project, and namespace exist and are accessible with the provided credentials.
  • Authentication errors: Verify that the API key or token used has sufficient permissions to read Job resources.
  • Empty results: If no jobs are returned, confirm that jobs exist in the specified namespace/project/cluster.
  • Network issues: Check connectivity to the Kubernetes/Rancher API endpoint.

Common error messages may relate to authorization failures, resource not found, or invalid parameters. Resolving these usually involves verifying credentials, resource identifiers, and network access.

Links and References

Discussion