mks cmd executor.tar.gz

Cluster Command Execution Script

This script executes specified commands on a cluster using the Rafay API. It retrieves the project and cluster IDs, runs the command, and outputs the result directly to the console.

Features

Prerequisites

Usage

1. Prepare a JSON Configuration File

Create a configuration file (e.g., config.json) with the following format:

{
  "base_url": "your_controller_endpoint",
  "api_key": "your_api_key",
  "project_name": "your_project_name",
  "cluster_name": "your_cluster_name",
  "command": "your_command",
  "timeout": 120
}

2. Run the Script

Execute the script by providing the path to your configuration file as an argument:

chmod +x mks-cmd-executor.sh
./mks-cmd-executor.sh config.json