Title
Create new category
Edit page index title
Edit category
Edit link
Spot Go SDK
Overview
The Rackspace Spot Go SDK is an idiomatic Go client library for programmatically managing Rackspace Spot resources. It provides a clean, type-safe interface for automating your cloud infrastructure management.
GitHub Repository | Full Examples
Installation
Add the SDK to your Go project:
Then import it in your code:
Authentication
Obtaining a Refresh Token
Navigate to Rackspace Spot API Access
Generate or copy your Refresh Token
Creating a Client
Create a SpotClient with your refresh token:
Tip: Set SPOT_REFRESH_TOKEN as an environment variable instead of hardcoding it in your config.
Quick Start
List Available Regions
Create a Cloudspace (K8s Cluster)
Query Market Pricing
Full Example: See examples/main.go for a complete cloudspace lifecycle example.
API Reference
Authentication
Method | Description |
|---|---|
| Authenticate with refresh token and obtain access token |
Organizations
Method | Description |
|---|---|
| List all organizations accessible to your account |
Cloudspaces
Method | Description |
|---|---|
| Create a new Kubernetes cluster with node pools |
| List all cloudspaces in an organization |
| Retrieve details of a specific cloudspace |
| Download the kubeconfig for a cloudspace |
| Delete a cloudspace and all associated resources |
Spot Node Pools
Method | Description |
|---|---|
| Add a new spot node pool to a cloudspace |
| List all spot node pools in a cloudspace |
| Get details of a specific spot node pool |
| Update spot node pool configuration |
| Remove a spot node pool from a cloudspace |
On-Demand Node Pools
Method | Description |
|---|---|
| Add an on-demand node pool to a cloudspace |
| List all on-demand node pools in a cloudspace |
| Get details of an on-demand node pool |
| Update on-demand node pool configuration |
| Remove an on-demand node pool |
Regions
Method | Description |
|---|---|
| List all available Rackspace Spot regions |
| Get details about a specific region |
Server Classes
Method | Description |
|---|---|
| List all server classes available in a region |
| Get specifications for a server class |
Pricing
Method | Description |
|---|---|
| Get pricing for all server classes |
| Get pricing for a specific server class |
| Get pricing for all server classes in a region |
| Get current market price for a server class |
| Get minimum acceptable bid price |
Data Types
CloudSpace
SpotNodePool
OnDemandNodePool
Contributing
This is an open source project. Contributions are welcome!
Fork the repository
Create a feature branch
Make your changes with tests
Submit a pull request
Resources
Support: For issues, open a GitHub issue. For security concerns, email product@rackspace.com.
© 2023 RACKSPACE TECHNOLOGY