Kubernetes icon

Kubernetes

Interact with Kubernetes

DaemonSets → Run

AI-generated

Overview

This node interacts with Kubernetes to perform various operations on resources, specifically supporting the 'DaemonSets' resource with the 'Run' operation. It allows running a container image with specified commands and environment variables within a Kubernetes namespace. This is useful for executing custom containerized tasks or scripts in a Kubernetes cluster, such as running a diagnostic container or a batch job within a DaemonSet context.

Use Case Examples

  1. Running a diagnostic container on all nodes using a DaemonSet with a specific image and command.
  2. Executing a custom script inside a DaemonSet-managed container with environment variables set.

Properties

Name Meaning
Image The container image to run in the DaemonSet.
Command The command array to execute inside the container.
Environment Variables Environment variables to set inside the container as an array of key-value pairs.
Namespace The Kubernetes namespace where the DaemonSet is located or will run.
Resource Name The name of the DaemonSet resource to target.

Output

JSON

  • stdout - The standard output from running the container 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, an error 'Command must be an array!' will be thrown.
  • Ensure the 'Environment Variables' property is a valid JSON array; otherwise, an error 'Env must be an array!' will be thrown.
  • The 'Namespace' and 'Resource Name' must be correctly specified to target the intended DaemonSet.
  • Kubernetes API credentials must be provided and valid; otherwise, the node will throw 'No credentials got returned!' error.

Discussion