Kubernetes icon

Kubernetes

Interact with Kubernetes

Overview

This node interacts with Kubernetes clusters to manage various Kubernetes resources. Specifically, for the Deployments resource with the Delete operation, it deletes a specified deployment within a given namespace.

Common scenarios where this node is beneficial include automating cleanup of deployments, managing lifecycle of applications in Kubernetes, or integrating deployment management into broader automation workflows.

For example, you can use this node to delete a deployment named "my-app" in the "production" namespace as part of a CI/CD pipeline when rolling back a release.

Properties

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

Output

The output JSON contains the response from the Kubernetes API after attempting to delete the specified deployment. This typically includes status information about the deletion request, such as confirmation that the resource was deleted or details if the resource was not found.

No binary data output is produced by this operation.

Dependencies

  • Requires valid Kubernetes API credentials configured in n8n to authenticate and authorize requests.
  • The node depends on an internal Kubernetes client utility to communicate with the Kubernetes API server.
  • The user must have appropriate permissions in the Kubernetes cluster to delete deployments in the specified namespace.

Troubleshooting

  • No credentials got returned!
    This error indicates missing or misconfigured Kubernetes API credentials. Ensure that the node has access to valid credentials before execution.

  • Resource not found or permission denied errors
    These occur if the specified deployment name does not exist in the given namespace or if the credentials lack sufficient permissions. Verify the deployment name, namespace, and RBAC permissions.

  • Invalid namespace or resource name
    Make sure the namespace and resource name inputs are correct and correspond to existing Kubernetes objects.

  • General API errors
    Network issues, incorrect cluster endpoint configuration, or expired tokens can cause failures. Check connectivity and credential validity.

Links and References

Discussion