Rancher27 icon

Rancher27

Interact with Rancher/Kubernetes API

Actions40

Overview

This node integrates with Rancher and Kubernetes APIs to manage various Kubernetes resources programmatically. Specifically, for the Secret resource with the Get operation, it retrieves one or more secrets from a specified Kubernetes namespace within a project and cluster.

Common scenarios where this node is beneficial include:

  • Automating retrieval of sensitive configuration data stored as Kubernetes Secrets.
  • Integrating secret data into workflows that require secure access credentials or tokens.
  • Auditing or monitoring secrets across different namespaces and projects in a Kubernetes cluster.

For example, you can use this node to fetch database credentials stored as a secret in a particular namespace before connecting your application to the database.

Properties

Name Meaning
Cluster Name or ID Select the Kubernetes cluster by name or ID where the secret resides. 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 where the secret exists. Depends on the selected project. Can be chosen from a list or specified via expression.

These properties are required to scope the request correctly to the desired secret location.

Output

The output is a JSON object representing the retrieved secret(s) from the Kubernetes API. The structure typically includes metadata about the secret (such as name, namespace, labels), and the secret data encoded in base64 format.

If multiple secrets are retrieved, the output will be an array of such JSON objects.

The node does not output binary data for this operation.

Dependencies

  • Requires connection to a Rancher/Kubernetes API endpoint.
  • Needs an API authentication token or API key credential configured in n8n 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 selection: Ensure that the 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 secrets in the specified namespace.
  • Empty or no data returned: Confirm that the secret exists in the specified namespace and that the correct resource and operation are selected.
  • Network or connectivity issues: Check network access to the Rancher/Kubernetes API endpoint.

Links and References

Discussion