Actions54
- Namespace Actions
- Deployment Actions
- Service Actions
- Pod Actions
- StatefulSet Actions
- ConfigMap Actions
- Secret Actions
- Job Actions
- CronJob Actions
- Node Actions
- Workload Actions
Overview
This node allows interaction 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 listing namespaces in a Kubernetes cluster.
- Integrating namespace data retrieval into CI/CD pipelines or monitoring workflows.
- Dynamically fetching namespaces to use as inputs for subsequent workflow steps.
For example, you could use this node to get all namespaces in a particular project of a cluster and then trigger alerts or further automation based on the namespaces' status or existence.
Properties
Name | Meaning |
---|---|
Cluster Name or ID | Select the Kubernetes cluster from which to retrieve namespaces. Can be chosen from a list or specified via an expression. |
Project Name or ID | (Optional) Select the project within the cluster. Can be chosen from a list or specified via an expression. |
Namespace Name or ID | (Optional) Select a specific namespace to retrieve. Can be chosen from a list or specified via an expression. |
Output
The output is a JSON object representing the retrieved namespace(s) details from the Rancher/Kubernetes API. The structure typically includes metadata and specifications of the namespace(s), such as name, labels, annotations, status, and other Kubernetes namespace attributes.
Since this operation deals with namespace data, no binary output is produced.
Example output snippet (conceptual):
{
"name": "example-namespace",
"labels": {
"environment": "production"
},
"annotations": {},
"status": {
"phase": "Active"
}
}
Dependencies
- Requires access to a Rancher or Kubernetes API endpoint.
- Needs an API authentication token or API key credential configured in n8n to authenticate requests.
- The node depends on dynamic loading methods to fetch available clusters, projects, and namespaces for selection.
Troubleshooting
- Missing or invalid cluster/project/namespace IDs: 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 used has sufficient permissions to read namespaces.
- Empty results: If no namespaces are returned, check if the project or cluster actually contains any namespaces or if filters are too restrictive.
- Network issues: Confirm that n8n can reach the Rancher/Kubernetes API endpoint without firewall or network restrictions.
Links and References
- Rancher API Documentation
- Kubernetes Namespaces
- n8n Expressions Documentation (for using expressions in property fields)