Rancher27 icon

Rancher27

Interact with Rancher/Kubernetes API

Actions40

Overview

This node integrates with the Rancher/Kubernetes API to manage Kubernetes resources programmatically within n8n workflows. Specifically, for the Namespace - Get operation, it retrieves information about one or more namespaces within a specified cluster and project context.

Common scenarios where this node is beneficial include:

  • Automating infrastructure management by fetching namespace details dynamically.
  • Integrating Kubernetes namespace data into broader automation workflows, such as monitoring, reporting, or conditional logic based on namespace existence or properties.
  • Using namespace metadata to drive deployment or configuration decisions in CI/CD pipelines.

Example use case: Automatically retrieve all namespaces in a given project to audit resource usage or trigger alerts if certain namespaces are missing or misconfigured.

Properties

Name Meaning
Cluster Name or ID Select the Kubernetes cluster from which to get the namespace. 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 specific namespace to retrieve. Depends on the selected project. Can be chosen from a list or specified via expression.

Output

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

The json field includes all relevant namespace data fetched from the API.

This node does not output binary data.

Dependencies

  • Requires access to a Rancher/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), which require proper API connectivity.

Troubleshooting

  • Missing or invalid cluster/project/namespace selection: Ensure that the cluster, project, and namespace exist and that the API credentials have sufficient permissions to list or get these resources.
  • Authentication errors: Verify that the API key or token credential is correctly set up and has the necessary scopes.
  • Empty results: If no namespace data is returned, confirm that the specified namespace exists in the selected project and cluster.
  • API connectivity issues: Check network access to the Rancher/Kubernetes API endpoint and validate that the endpoint URL is correct.

Links and References

Discussion