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 programmatically within n8n workflows. Specifically, for the CronJob - Delete operation, it allows users to delete a specified CronJob resource from a Kubernetes cluster managed by Rancher.
Typical use cases include:
- Automating cleanup of scheduled jobs that are no longer needed.
- Managing lifecycle of batch jobs in CI/CD pipelines.
- Dynamically removing CronJobs based on workflow conditions or external triggers.
Example: Automatically deleting a CronJob after a successful deployment or when a certain condition is met in your infrastructure automation.
Properties
| Name | Meaning |
|---|---|
| Cluster Name or ID | Select the Kubernetes cluster where the CronJob resides. Choose from a list or specify an ID via expression. |
| Project Name or ID | Select the project within the cluster. Depends on the selected cluster. Choose from a list or specify via expression. |
| Namespace Name or ID | Select the namespace within the project where the CronJob exists. Choose from a list or specify via expression. |
These properties identify the exact location of the CronJob resource to be deleted.
Output
The node outputs JSON data representing the response from the Rancher/Kubernetes API after attempting to delete the CronJob. This typically includes status information about the deletion request, such as success confirmation or error details.
No binary data output is involved in this operation.
Example output structure (simplified):
{
"status": "Success",
"message": "CronJob deleted successfully"
}
Dependencies
- Requires an API authentication token credential configured in n8n to connect securely to the Rancher/Kubernetes API.
- The node depends on Rancher API endpoints to perform operations on Kubernetes resources.
- Proper RBAC permissions must be granted to the API token to allow deletion of CronJob resources in the specified namespace.
Troubleshooting
Common issues:
- Insufficient permissions: The API token may lack rights to delete CronJobs in the target namespace.
- Incorrect cluster/project/namespace selection: Ensure these IDs/names are correct and accessible.
- Network connectivity problems between n8n and the Rancher API endpoint.
Error messages:
- "Forbidden" or "Unauthorized": Check API credentials and permissions.
- "Not Found": The specified CronJob does not exist in the given namespace.
- "Bad Request": Invalid parameters or malformed request; verify input property values.
Resolving these usually involves verifying credentials, permissions, and input parameters.
Links and References
- Kubernetes CronJob Documentation
- Rancher API Reference
- n8n Expressions Documentation (for using expressions in property fields)