Kubernetes icon

Kubernetes

Interact with Kubernetes

StatefulSets → Run

AI-generated

Overview

This node interacts with Kubernetes clusters, specifically supporting operations on various Kubernetes resources including StatefulSets. For the 'run' operation on StatefulSets, it allows running a pod with a specified container image and command within a given namespace. This is useful for executing containerized tasks or scripts dynamically in a Kubernetes environment. For example, a user can run a diagnostic command inside a pod or start a new container instance with a custom command.

Use Case Examples

  1. Run a pod in a StatefulSet with a specific image and command to perform a task.
  2. Execute a containerized script in a Kubernetes namespace for maintenance or data processing.

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., StatefulSet) to target.

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 cluster.

Troubleshooting

  • If no credentials are provided or returned, the node throws an error 'No credentials got returned!'. Ensure Kubernetes API credentials are correctly configured.
  • If the 'command' parameter is not a valid JSON array, the node throws 'Command must be an array!'. Verify the command input format.

Discussion