The rackctl command-line interface provides several commands for managing Kubernetes clusters and related resources. This document details all available commands and their options.
| Command | Description |
|---|---|
create | Creates a new Kubernetes cluster |
delete | Deletes an existing cluster |
gen-ssl | Generates SSL certificates for a given domain |
ps | Lists all running Kubernetes clusters |
switch | Switches the current context to a specified cluster |
create CommandCreates and provisions a new Kubernetes cluster.
rackctl create <cluster-name>
rackctl create <cluster-name> \
[--description <description>] \
[--cpu-limit <cpu>] \
[--ram-limit <ram>] \
[--disk-size <size>] \
[--region-code <region>] \
[--ttl <seconds>] \
[--do-not-delete <bool>]
| Parameter | Description | Default | Example |
|---|---|---|---|
name | Name of the cluster | (Required) | production-cluster |
--description | Description of the cluster | ”No description provided” | --description "Production environment for e-commerce app" |
--cpu-limit | CPU limit in cores | 2.0 | --cpu-limit 4.0 |
--ram-limit | RAM limit in GB | 3.5 | --ram-limit 8.0 |
--disk-size | Disk size in GB | 20 | --disk-size 100 |
--region-code | Region to deploy the cluster | ”ap_south_1” | --region-code us_east_1 |
--ttl | Time to live in seconds | 3000 (50 minutes) | --ttl 86400 (24 hours) |
--do-not-delete | Prevents automatic deletion | false | --do-not-delete true |
# Create a production cluster with 4 CPU cores, 8GB RAM, and 100GB disk space
rackctl create production-cluster \
--description "Production environment" \
--cpu-limit 4.0 \
--ram-limit 8.0 \
--disk-size 100 \
--region-code us_east_1
delete CommandDeletes an existing Kubernetes cluster.
rackctl delete --uuid <cluster-uuid>
| Parameter | Description | Example |
|---|---|---|
--uuid | UUID of the cluster to delete | --uuid 413f3e1c-b3a5-4e2d-a981-53ecbd0358ff |
# Delete a specific cluster
rackctl delete --uuid f75899c7-6d2a-4169-a7e2-450a3a8d7613
gen-ssl CommandGenerates SSL certificates for a specified domain.
rackctl gen-ssl <domain>
| Parameter | Description | Example |
|---|---|---|
domain | Domain name for which SSL needs to be generated | app1.dev.example.com |
# Generate SSL for a domain
rackctl gen-ssl app1.dev.example.com
ps CommandLists all running Kubernetes clusters, similar to docker ps.
rackctl ps
CLUSTER ID NAME CREATED STATE REGION
413f3e1c-b3a5-4e2d-a981-53ecbd0358ff may17-1 17/05/2025, 08:33:05 running ap_south_1
f75899c7-6d2a-4169-a7e2-450a3a8d7613 may17 17/05/2025, 08:13:31 running ap_south_1
switch CommandSwitches the current context to a specified cluster.
rackctl switch <cluster-id>
| Parameter | Description | Example |
|---|---|---|
id | ID or UUID of the cluster to switch to | 413f3e1c-b3a5-4e2d-a981-53ecbd0358ff |
# Switch to a specific cluster
rackctl switch 413f3e1c-b3a5-4e2d-a981-53ecbd0358ff
| Variable | Description | Example |
|---|---|---|
RACKCTL_SESSION_TOKEN | Authentication token for API requests | export RACKCTL_SESSION_TOKEN=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9... |
Resource Management
--ttl values for temporary clustersSecurity
Workflow Optimization
rackctl ps to monitor your running clustersswitch command to quickly change between working contexts