Kubernetes icon

Kubernetes

Interact with Kubernetes

Namespaces → Run

AI-generated

Overview

This node interacts with Kubernetes clusters, specifically supporting operations on various Kubernetes resources such as namespaces, pods, services, deployments, and more. The 'Run' operation allows users to run a pod with a specified container image, execute commands inside the pod, and set environment variables. This is useful for automating containerized workloads, running batch jobs, or testing container images within a Kubernetes environment.

Use Case Examples

  1. Run a pod in a specific namespace with a given container image and command to perform a batch job.
  2. Execute a command inside an existing pod to troubleshoot or gather information.
  3. Set environment variables for a pod before running it to customize its behavior.

Properties

Name Meaning
Image The container image to use for running the pod.
Command The command to execute inside the pod, provided as a JSON array.
Environment Variables Environment variables to set inside the pod, provided as a JSON array.
Namespace The Kubernetes namespace where the pod or resource is located or will be created.
Resource Name The name of the Kubernetes resource (e.g., pod) to operate on.

Output

JSON

  • stdout - Standard output from running a pod or executing a command inside a pod.

Dependencies

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

Troubleshooting

  • Ensure the 'Command' and 'Environment Variables' inputs are valid JSON arrays; otherwise, the node will throw an error.
  • Resource name is mandatory for operations like get, delete, logs, scale, patch, exec, restart, and port-forward; missing this will cause errors.
  • Check Kubernetes credentials are correctly configured and accessible to avoid authentication errors.

Discussion