Rancher icon

Rancher

Interact with Rancher/Kubernetes API

Overview

This node enables interaction with Rancher and Kubernetes APIs to manage various Kubernetes resources programmatically. Specifically, for the Service resource with the Delete operation, it allows users to delete a service within a specified cluster, project, and namespace.

Common scenarios where this node is beneficial include:

  • Automating cleanup of services in Kubernetes clusters as part of CI/CD pipelines.
  • Managing lifecycle of microservices by programmatically deleting obsolete or test services.
  • Integrating Rancher/Kubernetes service management into broader workflows without manual intervention.

Example use case:

  • Automatically delete a service after a deployment rollback or when a feature branch environment is torn down.

Properties

Name Meaning
Cluster Name or ID Select the target Kubernetes cluster by name or ID. This is required to specify where the service resides.
Project Name or ID (Optional) Select the project within the cluster. Helps scope the service deletion to a specific project context.
Namespace Name or ID (Optional) Select the namespace within the project. Further scopes the service deletion to a particular namespace.

These properties allow precise targeting of the service to delete by specifying its location in the Rancher/Kubernetes hierarchy.

Output

The node outputs an array of JSON objects representing the result of the delete operation for each input item processed. The exact structure depends on the Rancher/Kubernetes API response but typically includes confirmation of deletion or details about the deleted service.

No binary data output is produced by this operation.

Dependencies

  • Requires a configured Rancher/Kubernetes API credential with appropriate permissions to delete services.
  • Needs network access to the Rancher/Kubernetes API endpoint.
  • The node relies on internal methods to load options dynamically for clusters, projects, and namespaces.

Troubleshooting

  • Common issues:

    • Insufficient permissions: The API credential must have rights to delete services in the targeted cluster/project/namespace.
    • Incorrect cluster/project/namespace selection: Ensure the IDs or names are correct and correspond to existing entities.
    • Network connectivity problems to the Rancher/Kubernetes API can cause failures.
  • Error messages:

    • Authorization errors indicate missing or invalid API credentials.
    • Not found errors suggest the specified service or namespace does not exist.
    • Timeout or connection errors point to network or API availability issues.

Resolving these usually involves verifying credentials, checking resource existence, and ensuring network/API accessibility.

Links and References

Discussion