EMR-EKS is a command-line interface (CLI) tool created to simplify the management of AWS EMR jobs on EKS. It offers user-friendly commands for managing virtual clusters, describing, canceling, and cloning job runs, all with the convenience of built-in command autocompletion to enhance the user experience.
Run the Quick Installation Script:
git clone https://github.com/shivanshthapliyal/aws-emr-eks-cli.git
cd aws-emr-eks-cli
./install.sh
This script will set the necessary permissions, add the CLI to your PATH, and verify the setup.
If you want to manually install, see Manual Installation.
To use aws emr-eks cli, you can run the emr-eks
command followed by subcommands:
emr-eks <command> [options]
Command | Arguments | Description |
---|---|---|
fetch-virtual-clusters |
None | Fetches and saves the virtual clusters available in your AWS account. |
list-running-jobs |
<eks_cluster_name> <virtual_cluster_name> (This information can be autocompleted using TAB once fetch-virtual-clusters has run once.) |
Lists the running jobs in the specified EKS cluster and virtual cluster. |
describe-job |
<eks_cluster_name> <virtual_cluster_name> <JOB_ID> |
Describes a specific job identified by JOB_ID. |
cancel-job |
<eks_cluster_name> <virtual_cluster_name> <job_id> |
Cancels a specific job. |
clone-job |
<eks_cluster_name> <virtual_cluster_name> <JOB_ID> |
Clones a specific job. |
get_pods |
<eks_cluster_name> <virtual_cluster_name> <job_id> |
Retrieves pods related to the specified job. |
# Fetching Virtual Clusters for auto-completions
emr-eks fetch-virtual-clusters
# List running jobs on a virtual cluster
emr-eks list-running-jobs myekscluster myvirtualcluster
# Get Pods for a job
emr-eks get-pods myekscluster myvirtualcluster 000000012thisisajobID
# Describing a Job
emr-eks describe-job myekscluster myvirtualcluster 000000012thisisajobID
# Cancelling a Job
emr-eks cancel-job myekscluster myvirtualcluster 000000012thisisajobID
# Cloning a Job
emr-eks clone-job myekscluster myvirtualcluster 000000012thisisajobID
-
Clone the Repository
git clone https://github.com/shivanshthapliyal/aws-emr-eks-cli.git cd aws-emr-eks-cli
-
Set Executable Permissions
Make the script executable:
chmod +x bin/emr-eks
-
Add the Script to Your PATH
Optionally, you can add the tool to your system's PATH to use it from anywhere:
echo 'export PATH="$PATH:/path/to/aws-emr-eks-cli/bin"' >> ~/.zshrc source ~/.zshrc
Replace
/path/to/aws-emr-eks-cli
with the actual path to thebin
directory in your cloned repository.
For now, I could only develop autocompletions for following:
- bash
- zsh
Contributions are welcome! Please fork the repository and open a pull request with your improvements.
This project is licensed under the MIT License - see the LICENSE.md file for details.