rackctl CLI Options Reference

The rackctl command-line interface provides several commands for managing Kubernetes clusters and related resources. This document details all available commands and their options.

Available Commands

CommandDescription
createCreates a new Kubernetes cluster
deleteDeletes an existing cluster
gen-sslGenerates SSL certificates for a given domain
psLists all running Kubernetes clusters
switchSwitches the current context to a specified cluster

Command Details

create Command

Creates and provisions a new Kubernetes cluster.

Basic Usage

rackctl create <cluster-name>

Full Options

rackctl create <cluster-name> \
  [--description <description>] \
  [--cpu-limit <cpu>] \
  [--ram-limit <ram>] \
  [--disk-size <size>] \
  [--region-code <region>] \
  [--ttl <seconds>] \
  [--do-not-delete <bool>]

Parameters

ParameterDescriptionDefaultExample
nameName of the cluster(Required)production-cluster
--descriptionDescription of the cluster”No description provided”--description "Production environment for e-commerce app"
--cpu-limitCPU limit in cores2.0--cpu-limit 4.0
--ram-limitRAM limit in GB3.5--ram-limit 8.0
--disk-sizeDisk size in GB20--disk-size 100
--region-codeRegion to deploy the cluster”ap_south_1”--region-code us_east_1
--ttlTime to live in seconds3000 (50 minutes)--ttl 86400 (24 hours)
--do-not-deletePrevents automatic deletionfalse--do-not-delete true

Example

# 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 Command

Deletes an existing Kubernetes cluster.

Usage

rackctl delete --uuid <cluster-uuid>

Parameters

ParameterDescriptionExample
--uuidUUID of the cluster to delete--uuid 413f3e1c-b3a5-4e2d-a981-53ecbd0358ff

Example

# Delete a specific cluster
rackctl delete --uuid f75899c7-6d2a-4169-a7e2-450a3a8d7613

gen-ssl Command

Generates SSL certificates for a specified domain.

Usage

rackctl gen-ssl <domain>

Parameters

ParameterDescriptionExample
domainDomain name for which SSL needs to be generatedapp1.dev.example.com

Example

# Generate SSL for a domain
rackctl gen-ssl app1.dev.example.com

ps Command

Lists all running Kubernetes clusters, similar to docker ps.

Usage

rackctl ps

Example Output

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 Command

Switches the current context to a specified cluster.

Usage

rackctl switch <cluster-id>

Parameters

ParameterDescriptionExample
idID or UUID of the cluster to switch to413f3e1c-b3a5-4e2d-a981-53ecbd0358ff

Example

# Switch to a specific cluster
rackctl switch 413f3e1c-b3a5-4e2d-a981-53ecbd0358ff

Environment Variables

VariableDescriptionExample
RACKCTL_SESSION_TOKENAuthentication token for API requestsexport RACKCTL_SESSION_TOKEN=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...

Best Practices

  1. Resource Management

    • Request only the resources you need (CPU, RAM, disk) to optimize costs
    • Use appropriate --ttl values for temporary clusters
  2. Security

    • Store tokens securely, preferably in environment variables or secrets management systems
    • For CI/CD pipelines, use long-lived tokens from the token management interface
  3. Workflow Optimization

    • Use rackctl ps to monitor your running clusters
    • Use descriptive names and detailed descriptions for better organization
    • Utilize the switch command to quickly change between working contexts