Kubernetes icon

Kubernetes

Interact with Kubernetes

Overview

This node interacts with a Kubernetes cluster to perform various operations, specifically focusing on running a pod with a specified container image and command. It is useful for automating Kubernetes tasks such as running containers, managing pods, and executing commands within the cluster. For example, it can run a containerized application by specifying the image and command, and retrieve the output of the pod execution.

Use Case Examples

  1. Run a pod with a specific container image and command to execute a batch job and capture its output.
  2. Automate deployment tasks by running containers with custom commands in a specified namespace.

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 (e.g., pod) to target for the operation.

Output

JSON

  • stdout - The standard output from running the pod with the specified image and command.

Dependencies

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

Troubleshooting

  • Ensure that the Kubernetes credentials are correctly configured and accessible; otherwise, the node will throw an error 'No credentials got returned!'
  • The 'Command' property must be a valid JSON array; if not, the node throws 'Command must be an array!' error.
  • Verify that the specified namespace exists in the Kubernetes cluster to avoid namespace-related errors.

Discussion