Rancher27 icon

Rancher27

Interact with Rancher/Kubernetes API

Actions40

Overview

This node enables interaction with the Rancher/Kubernetes API, specifically allowing users to manage Kubernetes resources such as StatefulSets. For the StatefulSet - Get operation, it retrieves information about one or more StatefulSets within a specified Kubernetes namespace.

Common scenarios where this node is beneficial include:

  • Monitoring the status and configuration of StatefulSets in a Kubernetes cluster.
  • Automating workflows that require fetching StatefulSet details for auditing or reporting.
  • Integrating Kubernetes resource data into broader automation pipelines.

For example, you might use this node to fetch all StatefulSets in a particular namespace to check their current replicas and update strategies before performing an upgrade.

Properties

Name Meaning
Cluster Name or ID Select the Kubernetes cluster from which to retrieve the StatefulSet(s). Can be chosen from a list or specified via expression.
Project Name or ID Select the project within the cluster. Depends on the selected cluster. Can be chosen from a list or specified via expression.
Namespace Name or ID Select the namespace within the project to scope the StatefulSet retrieval. Can be chosen from a list or specified via expression.

These properties are required to specify the exact location in the Kubernetes environment from which to get the StatefulSet information.

Output

The output is a JSON object representing the retrieved StatefulSet(s) data from the Kubernetes API. The structure typically includes metadata (like name, labels, annotations), specification details (such as replicas, container images, volume claims), and status information (current state, ready replicas).

Since this node interacts with Kubernetes resources, the output JSON mirrors the Kubernetes StatefulSet resource schema, enabling further processing or decision-making in workflows.

No binary data output is produced by this operation.

Dependencies

  • Requires access 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 (getClusters, getProjects, getNamespaces).

Troubleshooting

  • Missing or invalid credentials: Ensure the API key or token credential is correctly set up and has sufficient permissions to read StatefulSets.
  • Incorrect cluster/project/namespace selection: Verify that the selected cluster, project, and namespace exist and are accessible.
  • API connectivity issues: Network problems or incorrect API URLs can cause failures; confirm connectivity to the Kubernetes API server.
  • Empty results: If no StatefulSets are returned, check if any exist in the specified namespace or if filters are too restrictive.

Common error messages may include authorization errors, resource not found, or timeout errors. Resolving these usually involves checking credentials, resource identifiers, and network access.

Links and References

Discussion