Kubernetes icon

Kubernetes

Interact with Kubernetes

Overview

This node enables interaction with Kubernetes resources, specifically supporting operations such as deleting a ReplicaSet. When configured to delete a ReplicaSet, the node connects to a Kubernetes cluster using provided credentials and deletes the specified ReplicaSet resource within a given namespace.

Common scenarios for this node include automating cleanup of ReplicaSets that are no longer needed, managing deployment rollbacks by removing outdated ReplicaSets, or integrating Kubernetes resource management into broader automation workflows.

For example, you might use this node in a workflow that monitors application health and automatically deletes ReplicaSets associated with failed deployments to free up resources.

Properties

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

Output

The node outputs JSON data representing the result of the delete operation. This typically includes status information returned from the Kubernetes API about the deletion request, such as confirmation of deletion or error details if the operation failed.

No binary data output is produced by this operation.

Dependencies

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

Troubleshooting

  • Missing Credentials: If no valid Kubernetes credentials are provided, the node will throw an error indicating that no credentials were returned. Ensure that the required API authentication token or credential is correctly configured in n8n.
  • Resource Not Found: Attempting to delete a ReplicaSet that does not exist or specifying an incorrect namespace or resource name may result in errors from the Kubernetes API. Verify the resource name and namespace are correct.
  • Permission Denied: Insufficient permissions for the provided credentials can cause authorization errors. Make sure the credentials have delete permissions for ReplicaSets in the target namespace.
  • Invalid Input: Providing empty or malformed values for required properties like resourceName may cause the operation to fail. Always specify valid strings for these inputs.

Links and References

Discussion