CLI Reference
Installing armadactl
armadactl is the official command-line tool for interacting with Armada. It's the recommended way to interact with Armada for most users, providing a simple and intuitive interface for all common operations.
Installation Methods
Using the Installation Script
The easiest way to install armadactl is using the provided installation script:
# From the Armada repository root
scripts/get-armadactl.shDownload from Releases
Alternatively, you can download the latest armadactl binaries directly from the Armada releases page. Download the appropriate binary for your platform:
# Example for macOS (Intel)
curl -L -o /tmp/armadactl "https://github.com/armadaproject/armada/releases/download/v0.3.101/armadactl_0.3.101_darwin_all.tar.gz" && \
tar -xzvf /tmp/armadactl && \
mv armadactl /usr/local/bin/armadactl && \
rm /tmp/armadactl && \
chmod +x /usr/local/bin/armadactl
# Example for Linux (AMD64)
curl -L -o /tmp/armadactl "https://github.com/armadaproject/armada/releases/download/v0.3.101/armadactl_0.3.101_linux_amd64.tar.gz" && \
tar -xzvf /tmp/armadactl && \
mv armadactl /usr/local/bin/armadactl && \
rm /tmp/armadactl && \
chmod +x /usr/local/bin/armadactlInstall via kubectl plugin (krew)
If you use kubectl and have krew installed, you can install armadactl as a kubectl plugin:
kubectl krew install armadactlThen use it as:
kubectl armadactl [subcommand]Configuration
armadactl uses a configuration file to manage connections to Armada instances. By default, it looks for a configuration file at $HOME/.armadactl.yaml.
Configuration File Structure
currentContext: main # Default context to be used
contexts:
main:
armadaUrl: <Your Armada API endpoint>
execAuth:
cmd: <Your auth command>
args:
- <Arg>
test:
armadaUrl: <Your Armada API endpoint>
execAuth:
cmd: <Your auth command>
args:
- <Arg>You can also specify a custom config file using the --config flag:
armadactl --config /path/to/config.yaml submit job.yamlCLI Commands
armadactl provides the following commands:
submit- Submit jobs to Armada queuescancel- Cancel running or queued jobsget- Get information about jobs, queues, or job setswatch- Watch job events in real-timecreate- Create queues and other resourcesdelete- Delete jobs, queues, or other resourcesupdate- Update jobs or queuesreprioritize- Change job prioritiespreempt- Preempt running jobscordon- Mark executors as unavailableuncordon- Mark executors as availableconfig- Manage armadactl configuration contextsversion- Display version informationdocs- Generate documentation
Example Usage Patterns
Submitting a Job
# Submit a single job from a YAML file
armadactl submit job.yaml
# Submit multiple jobs
armadactl submit job1.yaml job2.yaml job3.yamlMonitoring Jobs
# Get job status
armadactl get job <job-id>
# Watch job events in real-time
armadactl watch <job-set-id>
# List all jobs in a queue
armadactl get queue <queue-name>Managing Queues
# Create a new queue
armadactl create queue my-queue
# Get queue information
armadactl get queue my-queue
# Delete a queue
armadactl delete queue my-queueCancelling Jobs
# Cancel a specific job
armadactl cancel <job-id>
# Cancel all jobs in a job set
armadactl cancel <job-set-id>Getting Help
For detailed help on any command:
armadactl [command] --helpFor general help:
armadactl --helpLast updated on