Rancher27 icon

Rancher27

Interact with Rancher/Kubernetes API

Actions40

Overview

This node interacts with the Rancher/Kubernetes API to manage Kubernetes resources. Specifically, for the Pod resource with the Delete operation, it deletes a specified pod within a given cluster, project, and namespace.

This is useful in scenarios where you want to programmatically remove pods that are no longer needed, stuck, or need to be restarted as part of maintenance or deployment workflows. For example, you might delete a pod to force Kubernetes to recreate it with updated configurations or after troubleshooting an issue.

Properties

Name Meaning
Cluster Name or ID Select the Kubernetes cluster where the pod resides. You can choose from a list or specify an ID via expression.
Project Name or ID Select the project within the cluster. Depends on the selected cluster. Choose from a list or specify via expression.
Namespace Name or ID Select the namespace within the project. Depends on the selected project. Choose from a list or specify via expression.
Pod ID The unique identifier of the pod to delete. This is required to specify which pod to remove.

Output

The output JSON contains the response from the Rancher/Kubernetes API after attempting to delete the pod. 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": "pod-id",
    "namespace": "namespace-name"
  }
}

Dependencies

  • Requires access to a Rancher or Kubernetes API endpoint.
  • Needs an API authentication token or key configured in n8n credentials to authorize requests.
  • The node depends on dynamic loading of clusters, projects, and namespaces to populate selection options.

Troubleshooting

  • Common issues:

    • Invalid or missing Pod ID will cause the deletion to fail.
    • Insufficient permissions or incorrect API credentials may result in authorization errors.
    • Specifying a non-existent cluster, project, or namespace will cause lookup failures.
  • Error messages:

    • "Pod not found" — Verify the Pod ID and namespace are correct.
    • "Unauthorized" or "Forbidden" — Check API credentials and user permissions.
    • "Cluster/Project/Namespace not found" — Ensure the selected values exist and are accessible.

Resolving these usually involves verifying input parameters, ensuring proper API credentials, and confirming resource existence in the Kubernetes environment.

Links and References

Discussion