Kubernetes icon

Kubernetes

Interact with Kubernetes

Overview

This node interacts with Kubernetes clusters, specifically supporting operations on various Kubernetes resources including Jobs. The 'Delete' operation allows users to delete a specified Kubernetes resource, such as a Job, within a given namespace. This is useful for automating the cleanup or management of Kubernetes resources directly from an n8n workflow. For example, a user can delete a Job by specifying its namespace and resource name, streamlining cluster management tasks.

Use Case Examples

  1. Deleting a Kubernetes Job by specifying its namespace and resource name to automate resource cleanup.
  2. Running a Kubernetes Pod with a specified image and command.

Properties

Name Meaning
Namespace The Kubernetes namespace where the resource (Job) resides. Defaults to 'default' if not specified.
Resource Name The name of the specific Kubernetes resource (Job) to operate on, such as the Job to delete.

Output

JSON

  • stdout - Output from running a Kubernetes Pod command (relevant for 'run' operation).

Dependencies

  • Requires Kubernetes API credentials to authenticate and interact with the Kubernetes cluster.

Troubleshooting

  • If no credentials are returned, the node throws an error 'No credentials got returned!'. Ensure Kubernetes API credentials are correctly configured.
  • If the 'command' parameter is not an array when running a Pod, an error 'Command must be an array!' is thrown. Provide the command as a JSON array.

Discussion