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 Rancher and Kubernetes APIs to manage various Kubernetes resources, including nodes. Specifically for the Node resource with the Label operation, it allows users to add or update labels on a specified Kubernetes node within a cluster. Labels are key-value pairs used to organize, select, and manage Kubernetes objects.
Common scenarios where this node is beneficial include:
- Tagging nodes with environment information (e.g., "environment=production") to facilitate workload scheduling.
- Adding custom metadata to nodes for monitoring or operational purposes.
- Dynamically updating node labels as part of automation workflows to reflect changes in infrastructure or deployment strategies.
Example use case:
- Automatically label nodes based on their hardware capabilities or geographic location to influence pod scheduling decisions.
Properties
| Name | Meaning |
|---|---|
| Node ID | The unique identifier of the Kubernetes node to which labels will be added or updated. |
| Labels | A collection of key-value pairs representing the labels to add or update on the node. |
| Cluster Name or ID | Selects the target Kubernetes cluster by name or ID where the node resides. |
| Project Name or ID | Selects the project within the cluster context. |
| Namespace Name or ID | Selects the namespace within the project context (required but typically not used directly for node operations). |
Details on Labels property:
- It supports multiple labels.
- Each label consists of:
- Key: Label key string.
- Value: Label value string.
Output
The node outputs an array of JSON objects, each containing the response from the Rancher/Kubernetes API after applying the label operation on the node. The output JSON structure reflects the updated node object or confirmation of the label update.
No binary data output is produced by this operation.
Dependencies
- Requires access to a Rancher or Kubernetes cluster via an API.
- Needs an API authentication token or API key credential configured in n8n to authenticate requests.
- The node depends on dynamic loading of clusters, projects, and namespaces for selection, which requires proper API permissions.
Troubleshooting
Common issues:
- Invalid or missing Node ID: The operation requires a valid node identifier; ensure the correct node ID is provided.
- Insufficient permissions: The API token must have rights to modify node labels.
- Incorrect cluster/project/namespace selection: Ensure that the selected cluster and project correspond to the node's actual location.
- Empty or malformed labels: Labels must be valid key-value pairs; empty keys or values may cause errors.
Error messages:
- "Node not found": Verify the Node ID and cluster/project selections.
- "Unauthorized" or "Forbidden": Check API credentials and permissions.
- "Invalid label format": Confirm that labels are properly structured as key-value pairs.
Resolving these usually involves verifying input parameters, ensuring correct API credentials, and confirming cluster access rights.
Links and References
- Kubernetes Labels Documentation
- Rancher API Documentation
- n8n Expressions Documentation (for using expressions in property fields)