Rancher icon

Rancher

Interact with Rancher/Kubernetes API

Overview

The node interacts with Rancher and Kubernetes APIs to manage various Kubernetes resources, including workloads. Specifically for the Workload - Get operation, it retrieves information about workloads within a specified cluster, project, and namespace context. This is useful for monitoring or automating tasks related to workloads such as deployments, statefulsets, jobs, or cronjobs in Kubernetes environments managed by Rancher.

Common scenarios include:

  • Fetching workload details to monitor application status.
  • Integrating workload data into automation workflows.
  • Auditing workloads across different namespaces or projects.

Example: You want to get all workloads running in a specific namespace of a project on a particular cluster to check their current state or configuration.

Properties

Name Meaning
Cluster Name or ID Select the Kubernetes cluster by name or ID where the workload resides.
Project Name or ID (Optional) Select the project within the cluster to narrow down the scope.
Namespace Name or ID (Optional) Select the namespace within the project to further filter the workloads.

These properties allow you to specify the exact location in the Rancher/Kubernetes hierarchy from which to retrieve workload information.

Output

The output is an array of JSON objects representing the retrieved workload(s). Each object contains detailed information about a workload resource, such as its metadata, specifications, and status as returned by the Rancher/Kubernetes API.

The json output field includes all relevant workload data fetched from the API, enabling downstream nodes to process or analyze this information.

No binary data output is involved in this operation.

Dependencies

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

Troubleshooting

  • Missing or invalid cluster/project/namespace: 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 credential is valid and has sufficient permissions to read workloads.
  • Empty results: If no workloads are returned, confirm that workloads actually exist in the specified namespace/project/cluster.
  • API rate limits or connectivity issues: Check network connectivity and Rancher/Kubernetes API availability.

Links and References

Discussion