A command-line tool to manage Rackspace Spot resources including cloudspaces, node pools, organizations, and more.
- Complete resource lifecycle management
- Multiple output formats (JSON, YAML, Table)
- OAuth2 authentication
- Interactive command structure
- Cross-platform support
- Easy configuration management
- User should have access to Rackspace Spot Organization.
- User should have Refresh Token for the corresponding Organization.
Download the binary from the releases page: https://github.com/rackspace-spot/spotctl/releases
Move the binary to a directory in your PATH, for example:
sudo mv spotctl /usr/local/bin/Verify installation:
spotctl --versionIn order to use spotctl, you need to configure your spotctl: You need pass the organization, region and refresh token.
# Run the interactive configuration wizard
spotctl configurespotctl configure- Configure spotctl
spotctl cloudspaces list- List all cloudspacesspotctl cloudspaces get <name>- Get details of a specific cloudspacespotctl cloudspaces create- Create a new cloudspacespotctl cloudspaces delete <name>- Delete a cloudspacespotctl cloudspaces get-config <name>- Get kubeconfig for a cloudspace
spotctl nodepools spot list- List spot node poolsspotctl nodepools spot create- Create a spot node poolspotctl nodepools ondemand list- List on-demand node poolsspotctl nodepools ondemand create- Create an on-demand node pool
spotctl serverclasses list- List available server classesspotctl serverclasses get <name>- Get details of a server class
spotctl regions list- List available regionsspotctl regions get <name>- Get details of a region
spotctl organizations list- List organizationsspotctl organizations get <id>- Get organization details
spotctl pricing get <serverclass>- Get pricing informationspotctl pricing get-all- Get pricing information for all server classes
spotctl cloudspaces listspotctl cloudspaces create --name my-cluster --region us-east-1 spotctl cloudspaces create --config my-cluster-config.yamlspotctl cloudspaces create \
--name <name> \
--region <region> \
--org <org> \
--spot-nodepool '{"desired":1,"serverclass":"gp.vs1.medium-ord","bidprice":0.08}' \
--ondemand-nodepool '{"desired":1,"serverclass":"gp.vs1.medium-ord"}' spotctl cloudspaces create \
--name <name> \
--region <region> \
--org <org> \
--spot-nodepool desired=1,serverclass=gp.vs1.medium-ord,bidprice=0.08 \
--ondemand-nodepool desired=1,serverclass=gp.vs1.medium-ordspotctl cloudspaces get-config my-cluster --file ~/.kube/config-my-clusterspotctl cloudspaces delete --name <my-cluster># List all organizations
spotctl organizations list --output table
# Get organization details
spotctl organizations get org-123 --output json# Create spot node pool
spotctl nodepools spot create \
--name spot-workers \
--namespace org-123 \
--cloudspace prod-cluster \
--serverclass gp.vs1.medium-iad \
--desired 5 \
--bidprice 0.85
# List spot pools
spotctl nodepools spot list --namespace org-123 --output yaml# Create on-demand node pool
spotctl nodepools ondemand create \
--name critical-workers \
--namespace org-123 \
--cloudspace prod-cluster \
--serverclass mem.vs1.large-iad \
--desired 3
# List on-demand pools
spotctl nodepools ondemand list --namespace org-123spotctl cloudspaces create \
--name cli-test-205 \
--region us-central-ord-1 \
--org hooli \
--spot-nodepool "name=d21538b9-8e65-4c09-ba2d-8ab9651d0412,serverclass=gp.vs1.medium-ord,desired=2,bidprice=0.09"
spotctl cloudspaces create \
--name cli-test-157 \
--region us-central-ord-1 \
--org hooli \
--ondemand-nodepool "name=d21538b9-8e65-4c09-ba2d-8ab9651d0411,serverclass=gp.vs1.medium-ord,desired=2"
spotctl nodepools spot create --name b7ea7dd1-f421-4b81-96a5-c28a6400a420 --cloudspace cli-test-153 --desired 1 --serverclass gp.vs1.medium-ord --bidprice 0.08
spotctl nodepools spot update --name b7ea7dd1-f421-4b81-96a5-c28a6400a420 --cloudspace cli-test-153 --desired 2 --bidprice 0.08
spotctl nodepools spot delete --name b7ea7dd1-f421-4b81-96a5-c28a6400a420
spotctl nodepools spot get --name b7ea7dd1-f421-4b81-96a5-c28a6400a420
Ondemand Nodepool Operations
spotctl nodepools ondemand list --cloudspace cli-test-153
spotctl nodepools ondemand get --name b7ea7dd1-f421-4b81-96a5-c28a6400a406
spotctl nodepools ondemand update --name b7ea7dd1-f421-4b81-96a5-c28a6400a406 --cloudspace cli-test-153 --desired 2
spotctl nodepools ondemand create --name b7ea7dd1-f421-4b81-96a5-c28a6400a406 --cloudspace cli-test-153 --desired 1 --serverclass gp.vs1.medium-ord
spotctl nodepools ondemand delete --name b7ea7dd1-f421-4b81-96a5-c28a6400a406
spotctl cloudspaces create \
--name cli-test-205 \
--region us-central-ord-1 \
--org hooli \
--spot-nodepool "name=d21538b9-8e65-4c09-ba2d-8ab9651d0412,serverclass=gp.vs1.medium-ord,desired=2,bidprice=0.09"
spotctl cloudspaces create \
--name cli-test-157 \
--region us-central-ord-1 \
--org hooli \
--ondemand-nodepool "name=d21538b9-8e65-4c09-ba2d-8ab9651d0411,serverclass=gp.vs1.medium-ord,desired=2"
spotctl nodepools spot create --name b7ea7dd1-f421-4b81-96a5-c28a6400a420 --cloudspace cli-test-153 --desired 1 --serverclass gp.vs1.medium-ord --bidprice 0.08
spotctl nodepools spot update --name b7ea7dd1-f421-4b81-96a5-c28a6400a420 --cloudspace cli-test-153 --desired 2 --bidprice 0.08
spotctl nodepools spot delete --name b7ea7dd1-f421-4b81-96a5-c28a6400a420
spotctl nodepools spot get --name b7ea7dd1-f421-4b81-96a5-c28a6400a420
Ondemand Nodepool Operations
spotctl nodepools ondemand list --cloudspace cli-test-153
spotctl nodepools ondemand get --name b7ea7dd1-f421-4b81-96a5-c28a6400a406
spotctl nodepools ondemand update --name b7ea7dd1-f421-4b81-96a5-c28a6400a406 --cloudspace cli-test-153 --desired 2
spotctl nodepools ondemand create --name b7ea7dd1-f421-4b81-96a5-c28a6400a406 --cloudspace cli-test-153 --desired 1 --serverclass gp.vs1.medium-ord
spotctl nodepools ondemand delete --name b7ea7dd1-f421-4b81-96a5-c28a6400a406
| Format | Description | Example Command |
|---|---|---|
| JSON | Structured JSON output (default) | spotctl regions list --output json |
| Table | Human-readable table format | spotctl server-classes list --output table |
| YAML | YAML-formatted output | spotctl organizations list --output yaml |
For documentation, please refer to the official Rackspace Spot documentation. For support, ask your questions in the Rackspace community discussions, or drop us an email.
Copyright Β© Rackspace US, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
