Kubernetes icon

Kubernetes

Interact with Kubernetes

Overview

This node interacts with Kubernetes clusters to perform various operations on Kubernetes resources. Specifically, for the 'Jobs' resource with the 'Restart' operation, it allows restarting a Kubernetes Job within a specified namespace. This is useful for automating Kubernetes job management tasks such as restarting failed or completed jobs programmatically within workflows.

Use Case Examples

  1. Restart a Kubernetes Job named 'my-job' in the 'default' namespace to rerun the job automatically.
  2. Automate job restarts in a CI/CD pipeline to ensure jobs are retried on failure.

Properties

Name Meaning
Image The container image to use when running or restarting a job.
Namespace The Kubernetes namespace where the job resource exists.
Resource Name The name of the specific Kubernetes job resource to restart.

Output

JSON

  • stdout - The standard output from running or restarting the Kubernetes job, typically containing the result or logs of the operation.

Dependencies

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

Troubleshooting

  • If no credentials are provided or invalid, the node throws an error 'No credentials got returned!'. Ensure valid Kubernetes API credentials are 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.
  • Ensure the specified namespace and resource name exist in the Kubernetes cluster to avoid resource not found errors.

Discussion