Kubernetes Command Remote Exec

Execute Kubernetes or shell commands remotely via a remote API.

Overview

This node executes Kubernetes or shell commands remotely by sending them to a specified remote API endpoint. It is useful for automating command execution on Kubernetes clusters or remote servers without direct access, by leveraging an API that runs the commands and returns the results. For example, it can be used to retrieve pod information or describe pod details in a Kubernetes environment via API calls.

Use Case Examples

  1. Running 'kubectl get pods' to list all pods in a cluster.
  2. Executing multiple commands separated by newlines to perform batch operations remotely.

Properties

Name Meaning
Command The Kubernetes or shell command(s) to execute remotely. Multiple commands can be separated by newlines.
Remote API URL The URL of the remote API endpoint that will receive and execute the commands.

Output

JSON

  • results
    • ``
      * command - The executed command string.
      * output - The output returned from executing the command.
  • result - Warning message if no command execution results are received.

Dependencies

  • Requires a remote API endpoint capable of executing shell or Kubernetes commands and returning results in JSON format.

Troubleshooting

  • If no commands are provided, the node throws an error indicating no valid shell commands were found.
  • If the remote API URL is incorrect or unreachable, the node throws an error with the message from the failed request.
  • Timeouts may occur if the remote API does not respond within 25 seconds, resulting in an error.

Discussion