Rancher icon

Rancher

Interact with Rancher/Kubernetes API

Overview

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

Typical use cases include:

  • Fetching details of scheduled CronJobs in a Kubernetes environment managed by Rancher.
  • Monitoring or auditing CronJobs configurations and statuses.
  • Integrating Kubernetes CronJob data into automation workflows for reporting or triggering downstream processes.

For example, you might use this node to get all CronJobs running in a particular namespace of a cluster to check their schedules or last run times.

Properties

Name Meaning
Cluster Name or ID Select the Kubernetes cluster where the CronJob 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 (cluster, project, namespace) from which the CronJob(s) will be retrieved.

Output

The output is a JSON array where each item corresponds to a CronJob resource fetched from the Rancher/Kubernetes API. Each item's json field contains the detailed data structure representing the CronJob, including metadata, schedule, job template, status, and other relevant fields as provided by the Kubernetes API.

No binary data output is produced by this operation.

Dependencies

  • Requires access to a Rancher or Kubernetes API endpoint configured with appropriate credentials (an API key or token).
  • The node depends on n8n credentials that provide authentication to the Rancher/Kubernetes API.
  • The node uses internal methods to load options dynamically for clusters, projects, and namespaces.

Troubleshooting

  • Authentication errors: Ensure the API credentials are valid and have sufficient permissions to read CronJob resources.
  • Resource not found: Verify that the specified cluster, project, and namespace exist and that the CronJob(s) are present there.
  • Empty results: If no CronJobs are returned, confirm that the namespace/project/cluster parameters are correct and that CronJobs exist in that scope.
  • Load options fail: Dynamic loading of clusters, projects, or namespaces may fail if the API is unreachable or credentials lack listing permissions.

Links and References

Discussion