Kubernetes icon

Kubernetes

Interact with Kubernetes

Overview

This node allows interaction with Kubernetes clusters, specifically enabling operations on various Kubernetes resources such as Pods, Services, Deployments, and more. For the Pods - Delete operation, it deletes a specified Pod resource within a given namespace.

Common scenarios where this node is beneficial include automating cleanup of Pods, managing lifecycle of applications running in Kubernetes, or integrating Kubernetes management into broader workflows without manual kubectl commands.

For example, you can use this node to delete a Pod that is stuck or no longer needed, freeing up cluster resources automatically as part of a CI/CD pipeline or monitoring-triggered workflow.

Properties

Name Meaning
Namespace The Kubernetes namespace where the Pod resides. Defaults to "default".
Resource Name The name of the Pod resource to delete.

Output

The output is a JSON array containing the result of the delete operation. Typically, this will include status information about the deletion request, such as confirmation that the Pod was deleted or details if an error occurred.

No binary data output is produced by this operation.

Dependencies

  • Requires access to a Kubernetes cluster.
  • Needs an API authentication token or credentials configured in n8n to connect securely to the Kubernetes API.
  • The node depends on a Kubernetes client utility internally to perform API calls.

Troubleshooting

  • No credentials got returned!
    This error indicates that the node could not retrieve the necessary Kubernetes API credentials. Ensure that valid credentials are configured and selected for the node.

  • Resource Name missing or incorrect
    If the Pod name is not provided or misspelled, the delete operation will fail. Verify the exact Pod name exists in the specified namespace.

  • Namespace issues
    Using a wrong or non-existent namespace will cause the operation to fail. Confirm the namespace is correct and accessible.

  • API permission errors
    The credentials used must have sufficient permissions to delete Pods in the target namespace. Check RBAC settings in Kubernetes.

Links and References

Discussion