Kubernetes icon

Kubernetes

Interact with Kubernetes

Overview

This node interacts with Kubernetes to run a pod with a specified container image and command, then retrieves the output from the pod's execution. It is useful for automating containerized tasks within a Kubernetes cluster, such as running batch jobs or executing scripts inside a container environment. For example, you can use it to run a data processing script inside a container and capture the output for further workflow steps.

Use Case Examples

  1. Run a pod with a specific Docker image and command to process data and return the results.
  2. Execute a containerized script in a Kubernetes cluster and capture its output for logging or decision-making.

Properties

Name Meaning
Image The container image to use for running the pod.
Command The command to execute inside the container, provided as a JSON array.
Namespace The Kubernetes namespace where the pod will be run.
Resource Name The name of the Kubernetes resource (pod) to target.

Output

JSON

  • stdout - The standard output from the executed pod command.

Dependencies

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

Troubleshooting

  • Ensure the 'Command' property is a valid JSON array; otherwise, the node will throw an error 'Command must be an array!'.
  • Verify that Kubernetes credentials are correctly configured; missing credentials will cause the error 'No credentials got returned!'.
  • Make sure the specified container image is accessible and valid in the Kubernetes environment.
  • Check that the namespace and resource names are correct and exist in the Kubernetes cluster to avoid resource not found errors.

Discussion