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 integrates with Rancher and Kubernetes APIs to manage Kubernetes resources. Specifically, for the StatefulSet resource with the Scale operation, it allows you to adjust the number of replicas (pods) in a StatefulSet within a Kubernetes cluster managed by Rancher.
Common scenarios where this node is beneficial include:
- Dynamically scaling stateful applications such as databases or distributed systems that use StatefulSets.
- Automating scaling operations based on workload demands or maintenance tasks.
- Integrating Kubernetes scaling into broader workflows or automation pipelines.
For example, you can use this node to increase the number of replicas of a database StatefulSet during peak hours and scale down during off-peak times automatically.
Properties
Name | Meaning |
---|---|
Replicas | Number of replicas (pods) to scale the StatefulSet to. |
Cluster Name or ID | Select the Kubernetes cluster where the StatefulSet resides. Choose from the list or specify via expression. |
Project Name or ID | (Optional) Select the project within the cluster. Choose from the list or specify via expression. |
Namespace Name or ID | (Optional) Select the namespace containing the StatefulSet. Choose from the list or specify via expression. |
StatefulSet ID | The identifier of the StatefulSet to scale. |
Output
The node outputs JSON data representing the result of the scale operation on the StatefulSet. This typically includes details about the updated StatefulSet resource after scaling, such as its current replica count and status.
No binary data output is produced by this operation.
Dependencies
- Requires access to a Rancher-managed Kubernetes cluster.
- Needs an API authentication token or API key credential configured in n8n to authenticate requests to the Rancher/Kubernetes API.
- The node depends on dynamic loading of clusters, projects, namespaces, and StatefulSets via internal methods to populate dropdown options.
Troubleshooting
Common issues:
- Incorrect or missing cluster/project/namespace selection may cause failures in locating the StatefulSet.
- Insufficient permissions or invalid API credentials can lead to authorization errors.
- Specifying an invalid StatefulSet ID will result in not found errors.
- Network connectivity issues to the Rancher API endpoint can cause request timeouts or failures.
Error messages and resolutions:
- "Unauthorized" or "Forbidden": Check API credentials and ensure they have sufficient permissions.
- "StatefulSet not found": Verify the StatefulSet ID, namespace, and project selections.
- Timeouts or connection errors: Confirm network access to the Rancher API and correct endpoint configuration.
Links and References
- Kubernetes StatefulSet Documentation
- Rancher API Documentation
- n8n Expressions Documentation (for using expressions in property fields)