Actions90
- Namespaces Actions
- Pods Actions
- Services Actions
- Deployments Actions
- ReplicaSets Actions
- StatefulSets Actions
- DaemonSets Actions
- Jobs Actions
- CronJobs Actions
Namespaces → Delete
AI-generatedOverview
This node interacts with Kubernetes clusters to perform various operations on Kubernetes resources. Specifically, the 'Delete' operation deletes a specified resource within a given namespace. This is useful for automating the removal of Kubernetes resources such as namespaces, pods, services, deployments, etc., directly from an n8n workflow. For example, it can be used to clean up resources after a deployment or to manage cluster resources programmatically.
Use Case Examples
- Deleting a namespace named 'test-namespace' to clean up resources after testing.
- Removing a specific pod in the 'default' namespace to restart or replace it.
Properties
| Name | Meaning |
|---|---|
| Namespace | The Kubernetes namespace where the resource exists. Defaults to 'default' if not specified. |
| Resource Name | The name of the specific Kubernetes resource to delete within the namespace. |
Output
JSON
json- The JSON response from the Kubernetes API after deleting the resource, typically containing status or confirmation details.
Dependencies
- Requires Kubernetes API credentials to authenticate and interact with the Kubernetes cluster.
Troubleshooting
- Error 'Resource name is required for delete operation!' occurs if the resource name parameter is missing. Ensure the 'Resource Name' property is provided.
- Authentication errors may occur if Kubernetes credentials are invalid or missing. Verify the credentials configuration.
- If the resource does not exist or is already deleted, the Kubernetes API may return an error or empty response.
Links
- Kubernetes API - Delete Namespace - Official Kubernetes API documentation for deleting namespaces, applicable to other resource deletions as well.