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 Kubernetes nodes via the Rancher API, specifically supporting operations on nodes such as labeling. The "Label" operation enables 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:
- Dynamically tagging nodes for workload scheduling or grouping.
- Updating node metadata to reflect changes in environment or role.
- Automating node management workflows that depend on node labels.
For example, you can use this node to add a label like environment=production
to a node identified by its ID, helping your deployment pipelines target specific nodes.
Properties
Name | Meaning |
---|---|
Node ID | The unique identifier of the Kubernetes node to label. |
Labels | One or more key-value pairs representing the labels to add or update on the node. |
Cluster Name or ID | Selects the Kubernetes cluster where the node resides. Can be chosen from a list or specified via expression. |
Project Name or ID | (Optional) Selects the project within the cluster. Can be chosen from a list or specified via expression. |
Namespace Name or ID | (Optional) Selects the namespace within the project. Can be chosen from a list or specified via expression. |
The Labels property supports multiple entries, each requiring:
- Key: Label key string.
- Value: Label value string.
Output
The node outputs an array of JSON objects, each representing the result of the label operation on a node. The exact structure depends on the Rancher/Kubernetes API response but generally includes details about the updated node resource, including its current labels.
No binary data output is produced by this operation.
Dependencies
- Requires access to a Rancher API endpoint configured with appropriate credentials (an API key or token).
- The node depends on the Rancher API's ability to manage Kubernetes clusters and nodes.
- n8n must have the Rancher API credential configured to authenticate requests.
- The node uses dynamic option loading methods to fetch available clusters, projects, and namespaces.
Troubleshooting
- Missing or invalid Node ID: Ensure the Node ID is correctly specified; otherwise, the operation will fail to identify the target node.
- Insufficient permissions: The API credentials must have permission to modify node labels in the specified cluster.
- Cluster/Project/Namespace selection errors: Verify that the selected cluster, project, and namespace exist and are accessible with the provided credentials.
- Empty or malformed labels: Labels must be valid key-value pairs; empty keys or values may cause errors.
- API connectivity issues: Network problems or incorrect Rancher API URL configuration can prevent successful execution.
If an error occurs, check the error message for clues such as authentication failure, resource not found, or validation errors on labels.
Links and References
- Kubernetes Labels Documentation
- Rancher API Documentation
- n8n Expressions Documentation (for specifying IDs dynamically)