Quickstart
This guide walks you through creating your first Rackspace Spot Kubernetes cluster (a Cloudspace), accessing it, and deploying a simple application.
Step 1: Create a Cloudspace
A Cloudspace is your managed Kubernetes environment.
- Log in to the Rackspace Spot Dashboard.
- Click "Add Cloudspace".
- Select Region: Choose the geographic datacenter region where you want your cluster to run. See Data-center Locations to view all available regions. Once you create a cloudspace the region cannot be modified.
- Add Server Pools: Click "Add Server Pool". This defines a group of worker nodes.
- Choose Server Class: Select either On-Demand (fixed monthly price, guaranteed availability) or Spot (dynamic auction-based pricing for cost savings) you can start with either, but Spot highlights the unique value. (See Cloud Server Classes to view all available Server Classes)
Spot Servers Set Max Bid Price: If you chose Spot, enter the maximum price per hour you're willing to pay. Check the current market prices shown for guidance. See Bidding Best Practices.Optional Configure Pool: If desired, enable Cluster Autoscaling, or add custom (Link Removed)- Add more pools if needed (e.g., one Spot pool, one On-Demand pool for a hybrid setup).
- Configure Cloudspace Options:
For Production High Availability: Enable this feature for a replicated, more resilient Kubernetes control plane (+$40/mo). See (Link Removed)Optional Customize Kubernetes: Select a specific Kubernetes version or CNI (network plugin). Defaults are usually recommended.Optional Pre-emption Alerts: Configure Slack alerts if Spot nodes get pre-empted.
- Final Touches: Give your Cloudspace a descriptive Name.
- Create: Click the final confirmation button to start provisioning.
Cluster creation typically takes 5-15 minutes as worker nodes are acquired and configured.
Step 2: Access Your Cloudspace
Once your Cloudspace has been accepted and your control plane is active you can access your cluster via kubectl:
- Download Kubeconfig: In the dashboard sidebar for your Cloudspace, find and click the "Download Kubeconfig" button. This file contains the credentials needed to access your cluster.
- Security Note: Kubeconfig files expire every 72 hours for security. You'll need to download a new one periodically.
- Configure kubectl: Ensure you have kubectl installed. Place the downloaded kubeconfig file in a secure location. Tell kubectl to use it:
# Option 1: Set KUBECONFIG environment variable
export KUBECONFIG=/path/to/your/downloaded-kubeconfig.yaml
# Option 2: Merge with your existing ~/.kube/config
# Backup your existing config first
cp ~/.kube/config ~/.kube/config.backup
KUBECONFIG=~/.kube/config:/path/to/your/downloaded-kubeconfig.yaml kubectl config view --flatten > ~/.kube/config.new
mv ~/.kube/config.new ~/.kube/config
(See Access your Cloudspace via kubectl for more details)
- Verify Connection: Test your connection and view your cluster nodes:
kubectl get nodes -A
You should see the nodes from the server pool(s) you created listed with a Ready status. If you do not see any nodes check the spot dashboard to see if provisioning is still in progress or if there is an issue with your node pool.
Step 3: Deploy a Sample Application
Let's deploy a simple Nginx web server.
- Create a Deployment: This tells Kubernetes to run Nginx containers.
kubectl create deployment nginx-quickstart --image=nginx:latest
- Expose the Deployment: Create a Service of type LoadBalancer to make Nginx accessible externally. Rackspace Spot will provision a load balancer for you.
(See Deploy your Application for more examples)
Next Steps
Congratulations! You've created a Rackspace Spot Cloudspace and deployed an application.
- Explore Spot vs On-Demand to understand hybrid clusters.
- Learn about Pre-emption
- Review Bidding Best Practices
- Review Adding Servers.