Rancher27 icon

Rancher27

Interact with Rancher/Kubernetes API

Actions40

Overview

This node interacts with Rancher and Kubernetes APIs to manage various Kubernetes resources. Specifically, for the Deployment - Delete operation, it deletes a deployment resource within a specified Kubernetes namespace. This is useful in scenarios where you want to programmatically remove an existing deployment from your cluster, such as cleaning up outdated applications or automating environment teardown.

Practical examples include:

  • Automatically deleting a deployment after a CI/CD pipeline completes.
  • Removing test deployments created dynamically during integration tests.
  • Managing lifecycle of microservices by deleting old versions before deploying new ones.

Properties

Name Meaning
Cluster Name or ID Select the Kubernetes cluster where the deployment exists. Can be chosen from a list or specified via expression.
Project Name or ID Select the project within the cluster that contains the deployment. Depends on the selected cluster.
Namespace Name or ID Select the namespace within the project where the deployment resides. Depends on the selected project.

These properties are required to precisely identify the deployment to delete.

Output

The output JSON contains the response from the Rancher/Kubernetes API after attempting to delete the deployment. It typically includes status information about the deletion request, such as success confirmation or error details.

No binary data is output by this operation.

Example output structure (simplified):

{
  "status": "Success",
  "details": {
    "name": "deployment-name",
    "namespace": "namespace-name"
  }
}

Dependencies

  • Requires an API authentication token credential configured in n8n to access the Rancher/Kubernetes API.
  • The node depends on Rancher/Kubernetes API endpoints being accessible and properly configured.
  • The user must have sufficient permissions to delete deployments in the targeted namespace.

Troubleshooting

  • Common issues:

    • Incorrect cluster, project, or namespace selection leading to "resource not found" errors.
    • Insufficient permissions causing authorization failures.
    • Network connectivity problems preventing API calls.
  • Error messages and resolutions:

    • "Deployment not found": Verify the cluster, project, namespace, and deployment name are correct.
    • "Unauthorized" or "Forbidden": Check API credentials and user permissions.
    • Timeouts or connection errors: Ensure network access to the Rancher/Kubernetes API endpoint.

Links and References

Discussion