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 the Rancher/Kubernetes API to manage Kubernetes resources programmatically within n8n workflows. Specifically, for the Namespace - Delete operation, it deletes a specified namespace within a given cluster and project context.
Use cases include:
- Automating cleanup of namespaces after testing or deployment cycles.
- Managing lifecycle of environments by removing unused namespaces.
- Integrating namespace deletion into CI/CD pipelines to maintain cluster hygiene.
Example: Automatically delete a namespace after a feature branch is merged and its environment is no longer needed.
Properties
| Name | Meaning |
|---|---|
| Cluster Name or ID | Select the Kubernetes cluster where the namespace exists. Can be chosen from a list or specified via expression. |
| Project Name or ID | Select the project within the cluster that contains the namespace. Depends on the selected cluster. |
| Namespace Name or ID | Select the namespace to delete. Depends on the selected project. Can be chosen from a list or specified via expression. |
Output
The output JSON contains the response from the Rancher/Kubernetes API after attempting to delete the namespace. This typically includes status information about the deletion request, such as success confirmation or error details.
No binary data is produced by this operation.
Example output structure (simplified):
{
"status": "Success",
"message": "Namespace deleted successfully"
}
Dependencies
- Requires an API authentication token credential configured in n8n to connect securely to the Rancher/Kubernetes API.
- The node depends on dynamic loading methods to fetch available clusters, projects, and namespaces for user selection.
- Proper permissions are required on the Rancher/Kubernetes API to delete namespaces.
Troubleshooting
Common issues:
- Insufficient permissions to delete the namespace: Ensure the API token has the necessary RBAC rights.
- Incorrect cluster, project, or namespace IDs: Verify selections or expressions resolve correctly.
- Network connectivity problems to the Rancher API endpoint.
Error messages:
- "Namespace not found": The specified namespace does not exist in the selected project/cluster.
- "Unauthorized" or "Forbidden": The API token lacks permission to perform deletion.
- Timeouts or connection errors: Check network access and Rancher API availability.
Resolving these usually involves verifying credentials, resource identifiers, and network settings.