Actions54
- StatefulSet Actions
- ConfigMap Actions
- Secret Actions
- Job Actions
- CronJob Actions
- Node Actions
- Deployment Actions
- Service Actions
- Pod Actions
- Namespace Actions
- Workload Actions
Overview
This node integrates with Rancher and Kubernetes APIs to manage workloads within a Kubernetes cluster. Specifically, the Workload Rollback operation allows users to revert a workload (such as a deployment) to a previous revision. This is useful in scenarios where a recent update or deployment introduced issues, and you want to quickly restore the workload to a stable state.
Practical examples include:
- Rolling back a deployment after a failed update.
- Reverting a statefulset to a known good revision.
- Managing workload versions programmatically as part of CI/CD pipelines.
Properties
| Name | Meaning |
|---|---|
| Cluster Name or ID | Select the target Kubernetes cluster by name or ID. You can choose from a list or specify an ID via expression. |
| Project Name or ID | (Optional) Select the project within the cluster. Depends on the selected cluster. |
| Namespace Name or ID | (Optional) Select the namespace within the project. Depends on the selected project. |
These properties define the scope and context for the rollback operation, specifying exactly which workload in which environment should be rolled back.
Output
The output is a JSON object representing the result of the rollback operation. It typically contains details about the workload after rollback, such as its current revision, status, and metadata returned by the Rancher/Kubernetes API.
No binary data output is involved in this operation.
Dependencies
- Requires connection to a Rancher or Kubernetes API endpoint.
- Needs an API authentication token or API key credential configured in n8n to authorize requests.
- The node depends on internal methods to load options dynamically for clusters, projects, and namespaces.
Troubleshooting
Common Issues:
- Incorrect or missing cluster/project/namespace selection may cause the operation to fail.
- Specifying an invalid or non-existent revision ID will result in an error.
- Insufficient permissions on the Kubernetes cluster can prevent rollback actions.
Error Messages:
- "Revision ID is required" — Ensure you provide a valid revision ID to rollback to.
- "Resource not found" — Verify that the cluster, project, namespace, and workload IDs are correct.
- "Unauthorized" — Check that your API credentials have sufficient permissions.
To resolve these errors, double-check all input parameters, ensure the API credentials are valid and have appropriate access rights, and confirm the revision ID exists for the targeted workload.
Links and References
- Kubernetes Rollback Documentation
- Rancher API Reference
- n8n Expressions Documentation (for using expressions in property fields)