Actions40
- Node Actions
- Namespace Actions
- Deployment Actions
- Service Actions
- Pod Actions
- StatefulSet Actions
- ConfigMap Actions
- Secret Actions
- Job Actions
- CronJob Actions
Overview
This node integrates with the Rancher/Kubernetes API to manage Kubernetes resources programmatically within n8n workflows. Specifically, for the Service resource with the Get operation, it retrieves information about one or more Kubernetes services within a specified namespace of a project and cluster.
Common scenarios where this node is beneficial include:
- Automating monitoring or auditing of Kubernetes services.
- Fetching service details dynamically to use in subsequent workflow steps.
- Integrating Kubernetes service data into broader automation pipelines, such as deployment verification or alerting.
For example, you could use this node to get all services running in a particular namespace after a deployment completes, then process their endpoints or metadata further downstream.
Properties
| Name | Meaning |
|---|---|
| Cluster Name or ID | Select the Kubernetes cluster by name or ID where the service resides. |
| Project Name or ID | Select the project within the cluster that contains the namespace. |
| Namespace Name or ID | Select the namespace within the project from which to retrieve the service(s). |
These properties are required to scope the query correctly within the Rancher/Kubernetes environment.
Output
The output is an array of JSON objects representing the retrieved service(s). Each object contains detailed information about a Kubernetes service, including but not limited to metadata (name, labels, annotations), spec (type, ports, selectors), and status fields.
The exact structure corresponds to the Kubernetes Service resource schema returned by the Rancher/Kubernetes API.
No binary data output is produced by this operation.
Example output snippet (simplified):
{
"json": {
"metadata": {
"name": "my-service",
"namespace": "default",
"labels": { "app": "my-app" }
},
"spec": {
"type": "ClusterIP",
"ports": [{ "port": 80, "targetPort": 8080 }],
"selector": { "app": "my-app" }
},
"status": {
"loadBalancer": {}
}
}
}
Dependencies
- Requires access to a Rancher or Kubernetes cluster API.
- Needs an API authentication credential configured in n8n to authorize requests.
- The node depends on dynamic loading methods to populate options for clusters, projects, and namespaces, which require proper API connectivity.
Troubleshooting
- Missing or invalid cluster/project/namespace selection: Ensure the selected cluster, project, and namespace exist and the API credentials have permission to access them.
- API authentication errors: Verify that the API key or token used has sufficient rights and is correctly configured in n8n.
- Empty results: Confirm that services exist in the specified namespace; otherwise, the output will be empty.
- Network or connectivity issues: Check network access to the Rancher/Kubernetes API endpoint.
Links and References
- Kubernetes Services Documentation
- Rancher API Reference
- n8n Expressions Documentation (for using expressions in property fields)