Kubernetes icon

Kubernetes

Interact with Kubernetes

Pods → Exec

AI-generated

Overview

This node interacts with Kubernetes clusters to perform various operations on Kubernetes resources, specifically focusing on Pods for the 'Exec' operation. It allows executing commands inside a container of a specified Pod, which is useful for debugging, running scripts, or managing containerized applications directly from the workflow. For example, you can run shell commands inside a Pod's container to inspect its state or modify its behavior without needing direct access to the Kubernetes environment.

Use Case Examples

  1. Executing a shell command inside a Pod's container to check logs or system status.
  2. Running a script inside a container to perform maintenance tasks.
  3. Debugging a container by executing diagnostic commands remotely.

Properties

Name Meaning
Image The container image to use, relevant for operations like run, restart, exec, and patch.
Namespace The Kubernetes namespace where the Pod or resource resides.
Resource Name The name of the Kubernetes resource (e.g., Pod) to operate on.
Container Name The name of the container inside the Pod where the command will be executed.

Output

JSON

  • stdout - The standard output from the executed command inside the container.

Dependencies

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

Troubleshooting

  • Ensure Kubernetes credentials are correctly configured and accessible; missing credentials will cause the node to throw an error.
  • The 'resourceName' parameter is mandatory for the exec operation; omitting it will result in an error.
  • The 'command' parameter must be an array; providing a non-array value will cause an error.
  • Check that the specified container name exists within the Pod; otherwise, the exec command may fail.

Discussion