Rancher27 icon

Rancher27

Interact with Rancher/Kubernetes API

Actions40

Overview

This node integrates with the Rancher/Kubernetes API to manage Kubernetes resources programmatically within n8n workflows. Specifically, for the Service resource with the Delete operation, it allows users to delete a Kubernetes service within a specified cluster, project, and namespace.

Common scenarios where this node is beneficial include:

  • Automating cleanup of services that are no longer needed.
  • Managing lifecycle of microservices in Kubernetes environments.
  • Integrating Kubernetes service management into CI/CD pipelines or operational workflows.

For example, you might use this node to automatically delete a service after a deployment test completes or to remove obsolete services during infrastructure maintenance.

Properties

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

These properties are required to precisely identify the service's location in the Kubernetes hierarchy before deletion.

Output

The node outputs JSON data representing the response from the Rancher/Kubernetes API after attempting to delete the service. This typically includes status information about the deletion request.

The output structure is an array with one element per input item, each containing a json field with the API response details.

No binary data output is produced by this operation.

Dependencies

  • Requires an API authentication credential configured in n8n to connect to the Rancher/Kubernetes API.
  • The node depends on the Rancher/Kubernetes environment being accessible and properly configured with the specified clusters, projects, and namespaces.
  • The node uses internal methods to load options dynamically for clusters, projects, and namespaces.

Troubleshooting

  • Common issues:

    • Incorrect or missing cluster/project/namespace identifiers can cause the deletion to fail.
    • Insufficient permissions in the Kubernetes cluster may result in authorization errors.
    • Network connectivity issues between n8n and the Rancher/Kubernetes API endpoint can prevent successful execution.
  • Error messages:

    • Authorization errors typically indicate missing or invalid API credentials or insufficient RBAC permissions.
    • Resource not found errors suggest that the specified service does not exist in the given namespace/project/cluster.
    • Timeout or connection errors imply network or API availability problems.

To resolve these:

  • Verify the correctness of cluster, project, and namespace selections.
  • Ensure the API credential has appropriate permissions.
  • Check network connectivity and Rancher/Kubernetes API health.

Links and References

Discussion