Cette page n'est pas encore traduite. Affichage de la version anglaise.
Detailed CLI Options
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
| 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 |
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
| 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 |
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
| Parameter | Description | Example |
|---|---|---|
--uuid | UUID 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
| Parameter | Description | Example |
|---|---|---|
domain | Domain name for which SSL needs to be generated | app1.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
| Parameter | Description | Example |
|---|---|---|
id | ID or UUID of the cluster to switch to | 413f3e1c-b3a5-4e2d-a981-53ecbd0358ff |
Example
# Switch to a specific cluster
rackctl switch 413f3e1c-b3a5-4e2d-a981-53ecbd0358ff
Environment Variables
| Variable | Description | Example |
|---|---|---|
RACKCTL_SESSION_TOKEN | Authentication token for API requests | export RACKCTL_SESSION_TOKEN=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9... |
Best Practices
-
Resource Management
- Request only the resources you need (CPU, RAM, disk) to optimize costs
- Use appropriate
--ttlvalues for temporary clusters
-
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
-
Workflow Optimization
- Use
rackctl psto monitor your running clusters - Use descriptive names and detailed descriptions for better organization
- Utilize the
switchcommand to quickly change between working contexts
- Use