Kubernetes icon

Kubernetes

Interact with Kubernetes

StatefulSets → Run

AI-generated

Overview

This node interacts with Kubernetes StatefulSets to perform various operations such as running a pod with a specified image and command, restarting, executing commands inside containers, and patching resources. It is useful for automating Kubernetes management tasks within workflows, such as deploying applications, managing container lifecycle, and scaling resources. For example, you can run a new pod with a custom image and environment variables, or restart a StatefulSet to apply updates.

Use Case Examples

  1. Run a pod in a StatefulSet with a specific Docker image and command to perform a batch job.
  2. Restart a StatefulSet to refresh the pods after configuration changes.
  3. Execute a command inside a container of a StatefulSet for debugging purposes.

Properties

Name Meaning
Image The Docker image to use when running a pod in the StatefulSet.
Command The command array to run inside the pod container.
Environment Variables Environment variables to set inside the pod container.
Namespace The Kubernetes namespace where the StatefulSet resides.
Resource Name The name of the StatefulSet resource to operate on.

Output

JSON

  • stdout - Standard output from running a pod or executing a command inside a container.
  • logs - Logs retrieved from a container in the StatefulSet.

Dependencies

  • Requires Kubernetes API credentials for authentication and interaction with the Kubernetes cluster.

Troubleshooting

  • Ensure Kubernetes credentials are correctly configured; missing credentials will cause errors.
  • The 'Command' and 'Environment Variables' inputs must be valid JSON arrays; otherwise, the node will throw an error.
  • Resource name is required for operations like get, delete, logs, scale, patch, exec, restart, and port-forward; missing this will cause errors.
  • Common error messages include 'No credentials got returned!' and 'Resource name is required for [operation] operation!'. These indicate missing configuration or input parameters.

Discussion