Skip to main content

CLI Reference

Complete reference for all sloth-kubernetes commands.


Global Flags

These flags work with all commands:

FlagDescriptionDefault
--help, -hShow help for command-
--version, -vShow version-
--debugEnable debug loggingfalse
--config, -cPath to config filecluster.lisp

Commands Overview

sloth-kubernetes [command] [stack-name] [flags]

Most commands require a stack name as the first argument. The stack name identifies your Pulumi stack (e.g., production, staging, my-cluster). Commands that depend on kubeconfig automatically retrieve it from the stack.

Available Commands:

Deployment & Configuration:

Cluster Operations:

  • kubectl - Kubernetes operations (stack-aware)
  • helm - Helm chart management (stack-aware)
  • kustomize - Kustomize operations (stack-aware)
  • kubeconfig - Generate kubeconfig

Node & Infrastructure:

  • nodes - Manage cluster nodes
  • salt - Node management with SaltStack
  • vpn - VPN management (WireGuard or Tailscale/Headscale)

Monitoring & Operations:

  • health - Cluster health checks (stack-aware)
  • backup - Velero backup management (stack-aware)
  • benchmark - Cluster benchmarks (stack-aware)
  • upgrade - Cluster upgrades (stack-aware)
  • history - View operation history

GitOps & Addons:

  • argocd - ArgoCD GitOps (stack-aware)
  • addons - Manage cluster addons via GitOps

State Management:

  • stacks - Manage Pulumi stacks
  • pulumi - Direct Pulumi operations (no CLI required)

Utility:

  • version - Show version info
  • list - List deployed clusters
  • status - Show cluster status

deploy

Deploy a new Kubernetes cluster or update an existing one.

Usage

sloth-kubernetes deploy [flags]

Flags

FlagTypeDescriptionRequiredDefault
--config, -cstringPath to cluster config fileYescluster.lisp
--dry-runboolPreview changes without applyingNofalse
--auto-approveboolSkip confirmation promptNofalse
--parallelintMax parallel operationsNo10
--timeoutdurationDeployment timeoutNo30m

Examples

# Deploy with default config
sloth-kubernetes deploy --config cluster.lisp

# Deploy with custom config
sloth-kubernetes deploy --config production.lisp

# Preview changes (dry run)
sloth-kubernetes preview --config cluster.lisp

# Auto-approve without confirmation
sloth-kubernetes deploy --config cluster.lisp --auto-approve

# Deploy with timeout
sloth-kubernetes deploy --config cluster.lisp --timeout 45m

Output

Sloth Kubernetes Deployment
Slowly, but surely deploying your cluster...

Stack: my-cluster
Config: cluster.yaml

Preview:
+ 2 VPCs
+ 1 WireGuard VPN server
+ 3 Master nodes
+ 2 Worker nodes
+ 5 DNS records

Continue with deployment? [y/N]: y

✓ Creating resources... (5m 32s)
✓ Installing Kubernetes... (3m 45s)
✓ Configuring VPN mesh... (1m 12s)

🦥 Deployment complete!
Time: 10m 29s
Kubeconfig: ./my-cluster-kubeconfig.yaml

destroy

Destroy a Kubernetes cluster and all associated resources.

Usage

sloth-kubernetes destroy [flags]

Flags

FlagTypeDescriptionRequiredDefault
--config, -cstringPath to cluster config fileYescluster.lisp
--force, -fboolSkip confirmation promptNofalse
--remove-stateboolAlso remove state filesNofalse

Examples

# Destroy clustersloth-kubernetes destroy

# Force destroy (no confirmation)
sloth-kubernetes destroy --force

# Destroy and remove state
sloth-kubernetes destroy --remove-state

Output

🦥 Sloth Kubernetes Destruction
Slowly tearing down your cluster...

⚠ WARNING: This will destroy:
- 2 VPCs
- 1 VPN server
- 5 nodes (3 masters, 2 workers)
- All data and volumes

Type cluster name to confirm: my-cluster

✓ Removing nodes... (3m 12s)
✓ Destroying VPN... (45s)
✓ Deleting VPCs... (1m 5s)

🦥 Cluster destroyed successfully!

nodes

Manage cluster nodes: list, add, remove, or drain.

Subcommands

  • nodes list - List all nodes- nodes add - Add nodes to cluster- nodes remove - Remove nodes from cluster- nodes drain - Drain a node for maintenance

nodes list

List all nodes in the cluster.

sloth-kubernetes nodes list [flags]

Flags:

FlagTypeDescriptionDefault
--config, -cstringCluster configcluster.lisp
--output, -ostringOutput format: table, json, yamltable

Example:

# List nodessloth-kubernetes nodes list

# Output as JSON
sloth-kubernetes nodes list -o json

Output:

🦥 Cluster Nodes

NAME PROVIDER ROLE STATUS IP REGION
do-master-1 digitalocean master Ready 10.10.1.5 nyc3
linode-master-1 linode master Ready 10.11.1.5 us-east
linode-master-2 linode master Ready 10.11.1.6 us-east
do-worker-1 digitalocean worker Ready 10.10.1.10 nyc3
linode-worker-1 linode worker Ready 10.11.1.10 us-east

Total: 5 nodes (3 masters, 2 workers)

nodes add

Add new nodes to an existing cluster.

sloth-kubernetes nodes add --pool POOL_NAME --count COUNT [flags]

Flags:

FlagTypeDescriptionRequired
--poolstringNode pool name from configYes
--countintNumber of nodes to addYes
--config, -cstringCluster configNo

Example:

# Add 2 workers to linode-workers poolsloth-kubernetes nodes add --pool linode-workers --count 2

# Add 1 master
sloth-kubernetes nodes add --pool do-masters --count 1

nodes remove

Remove nodes from the cluster.

sloth-kubernetes nodes remove NODE_NAME [flags]

Flags:

FlagTypeDescriptionDefault
--force, -fboolSkip drain and delete immediatelyfalse
--drain-timeoutdurationTimeout for draining5m

Example:

# Remove a node (with graceful drain)sloth-kubernetes nodes remove do-worker-2

# Force remove without drain
sloth-kubernetes nodes remove do-worker-2 --force

nodes drain

Drain a node for maintenance.

sloth-kubernetes nodes drain NODE_NAME [flags]

Example:

# Drain node for maintenancesloth-kubernetes nodes drain do-worker-1

vpn

Manage VPN networking with WireGuard or Tailscale/Headscale.

Subcommands

Tailscale/Headscale (Embedded Client):

  • vpn connect - Connect local machine to Tailscale mesh
  • vpn disconnect - Disconnect from Tailscale mesh

WireGuard:

  • vpn status - Show VPN status
  • vpn peers - List VPN peers
  • vpn join - Join WireGuard mesh
  • vpn leave - Leave WireGuard mesh
  • vpn test - Test VPN connectivity
  • vpn config - Get node WireGuard config
  • vpn client-config - Generate client config

vpn connect (Tailscale)

Connect your local machine to the Tailscale mesh using the embedded client. No system-wide Tailscale installation required.

sloth-kubernetes vpn connect <stack-name> [flags]

Flags:

FlagTypeDescriptionDefault
--daemonboolRun in backgroundfalse
--hostnamestringCustom hostname in tailnetAuto-generated

Example:

# Connect in daemon mode (recommended)
sloth-kubernetes vpn connect my-cluster --daemon

# Connect with custom hostname
sloth-kubernetes vpn connect my-cluster --daemon --hostname my-laptop

Output:

🔌 VPN Connect (Daemon) - Stack: my-cluster

Starting VPN daemon in background...
Waiting for VPN connection to establish...
✓ VPN daemon started (PID: 12345)
SOCKS5 proxy running on 127.0.0.1:64172

kubectl commands will automatically use the VPN tunnel
Use 'sloth vpn disconnect my-cluster' to stop

Note: When connected, kubectl commands automatically route through the VPN:

sloth-kubernetes kubectl my-cluster get nodes  # Works through VPN

vpn disconnect (Tailscale)

Disconnect from the Tailscale mesh and stop the daemon.

sloth-kubernetes vpn disconnect <stack-name>

Example:

sloth-kubernetes vpn disconnect my-cluster

Output:

🔌 VPN Disconnect - Stack: my-cluster

Stopping VPN daemon (PID: 12345)...
✓ VPN daemon stopped
Cleaning up connection state...
✓ Disconnected and cleaned up VPN state

vpn status (WireGuard)

Show WireGuard VPN status and connected nodes.

sloth-kubernetes vpn status <stack-name>

Output:

═══════════════════════════════════════════════════════════════
VPN STATUS - Stack: production
═══════════════════════════════════════════════════════════════

METRIC VALUE
------ -----
VPN Mode WireGuard Mesh
Total Nodes 6
Total Tunnels 15
VPN Subnet 10.8.0.0/24
Status All tunnels active

vpn peers (WireGuard)

List all VPN peers in the mesh.

sloth-kubernetes vpn peers <stack-name>

Output:

NODE         LABEL      VPN IP       PUBLIC KEY        LAST HANDSHAKE   TRANSFER
---- ----- ------ ---------- -------------- --------
master-1 - 10.8.0.10 ABC123def456... 30s ago 1.2MB / 2.4MB
worker-1 - 10.8.0.20 GHI789jkl012... 1m ago 3.5MB / 5.2MB
laptop personal 10.8.0.100 MNO345pqr678... 2m ago 500KB / 1.2MB

vpn join (WireGuard)

Join your local machine or a remote host to the WireGuard mesh.

sloth-kubernetes vpn join <stack-name> [flags]

Flags:

FlagTypeDescriptionDefault
--remotestringRemote SSH host to add-
--vpn-ipstringCustom VPN IP addressAuto-assign
--labelstringPeer label/name-
--installboolAuto-install WireGuardfalse

Example:

# Join local machine
sloth-kubernetes vpn join production --install

# Join with label
sloth-kubernetes vpn join production --label laptop --install

# Join remote host
sloth-kubernetes vpn join production --remote user@server.com

vpn leave (WireGuard)

Remove a machine from the WireGuard mesh.

sloth-kubernetes vpn leave <stack-name> [flags]

Flags:

FlagTypeDescriptionDefault
--vpn-ipstringVPN IP of peer to removeAuto-detect

Example:

# Leave VPN
sloth-kubernetes vpn leave production

# Remove specific peer
sloth-kubernetes vpn leave production --vpn-ip 10.8.0.100

vpn client-config (WireGuard)

Generate WireGuard client configuration file.

sloth-kubernetes vpn client-config <stack-name> [flags]

Flags:

FlagTypeDescriptionDefault
--output, -ostringOutput file pathwg0-client.conf
--qrboolGenerate QR codefalse

Example:

# Generate client config
sloth-kubernetes vpn client-config production

# Generate QR code for mobile
sloth-kubernetes vpn client-config production --qr

stacks

Manage Pulumi stacks for cluster state.

Subcommands

  • stacks list - List all stacks- stacks state list - List stack resources- stacks state delete - Delete specific resources

stacks list

List all Pulumi stacks.

sloth-kubernetes stacks list

Example:

# List stackssloth-kubernetes stacks list

Output:

🦥 Pulumi Stacks

NAME LAST UPDATE RESOURCE COUNT
my-cluster 2 hours ago 47 resources
staging-cluster 1 day ago 23 resources

stacks state list

List all resources in a stack.

sloth-kubernetes stacks state list [flags]

Flags:

FlagTypeDescriptionDefault
--config, -cstringCluster configcluster.lisp
--typestringFilter by resource type-

Example:

# List all resourcessloth-kubernetes stacks state list

# Filter by type
sloth-kubernetes stacks state list --type digitalocean:Droplet

kubeconfig

Generate kubeconfig for cluster access from a stack.

Usage

sloth-kubernetes kubeconfig <stack-name> [flags]

Flags

FlagTypeDescriptionDefault
--output, -ostringOutput filestdout

Examples

# Print kubeconfig for a stack
sloth-kubernetes kubeconfig my-cluster

# Save to file
sloth-kubernetes kubeconfig my-cluster > ~/.kube/config

# Use immediately with kubectl
export KUBECONFIG=~/.kube/config
sloth-kubernetes kubeconfig production > $KUBECONFIG
kubectl get nodes

version

Show version information.

Usage

sloth-kubernetes version

Output

🦥 Sloth Kubernetes
Version: 1.0.0
Git Commit: abc123
Built: 2025-01-15T10:30:00Z
Go Version: go1.23.4
Platform: darwin/arm64

kubectl

Run kubectl commands against a stack's cluster. The kubeconfig is automatically retrieved from the Pulumi stack.

Usage

sloth-kubernetes kubectl <stack-name> <kubectl-command>

Examples

# Get nodes
sloth-kubernetes kubectl my-cluster get nodes

# Get all pods
sloth-kubernetes kubectl my-cluster get pods -A

# Apply manifest
sloth-kubernetes kubectl my-cluster apply -f deployment.yaml

# View pod logs
sloth-kubernetes kubectl my-cluster logs -f nginx-pod

health

Run health checks on a stack's cluster.

Usage

sloth-kubernetes health <stack-name> [flags]

Flags

FlagDescriptionDefault
--verbose, -vShow verbose outputfalse
--compactShow compact output (only issues)false
--checksSpecific checks to runAll

Examples

# Full health check
sloth-kubernetes health my-cluster

# Verbose output
sloth-kubernetes health my-cluster --verbose

# Specific checks only
sloth-kubernetes health my-cluster --checks nodes,pods,dns

backup

Manage Velero backups for a stack's cluster.

Usage

sloth-kubernetes backup <subcommand> <stack-name> [flags]

Subcommands

SubcommandDescription
statusCheck Velero status
createCreate a backup
listList backups
describeDescribe a backup
deleteDelete a backup
restoreRestore from backup
schedule createCreate backup schedule
schedule listList schedules
schedule deleteDelete schedule

Examples

# Check Velero status
sloth-kubernetes backup status my-cluster

# Create backup
sloth-kubernetes backup create my-cluster my-backup

# List backups
sloth-kubernetes backup list my-cluster

# Restore from backup
sloth-kubernetes backup restore my-cluster --from-backup my-backup

benchmark

Run performance benchmarks on a stack's cluster.

Usage

sloth-kubernetes benchmark <subcommand> <stack-name> [flags]

Subcommands

SubcommandDescription
runExecute benchmarks
quickQuick benchmark summary
reportDisplay saved report
compareCompare two reports

Examples

# Run all benchmarks
sloth-kubernetes benchmark run my-cluster

# Run specific type
sloth-kubernetes benchmark run my-cluster --type network

# Quick benchmark
sloth-kubernetes benchmark quick my-cluster

# Save results
sloth-kubernetes benchmark run my-cluster --output json --save results.json

upgrade

Manage Kubernetes version upgrades for a stack's cluster.

Usage

sloth-kubernetes upgrade <subcommand> <stack-name> [flags]

Subcommands

SubcommandDescription
planCreate upgrade plan
applyExecute upgrade
rollbackRollback to previous version
versionsList available versions
statusShow upgrade status

Examples

# Check available versions
sloth-kubernetes upgrade versions my-cluster

# Plan upgrade
sloth-kubernetes upgrade plan my-cluster --to v1.29.0

# Execute upgrade
sloth-kubernetes upgrade apply my-cluster --to v1.29.0

# Rollback
sloth-kubernetes upgrade rollback my-cluster

argocd

Manage ArgoCD GitOps integration for a stack's cluster.

Usage

sloth-kubernetes argocd <subcommand> <stack-name> [flags]

Subcommands

SubcommandDescription
installInstall ArgoCD
statusCheck ArgoCD status
passwordGet admin password
appsList applications
syncSync applications

Examples

# Install ArgoCD
sloth-kubernetes argocd install my-cluster

# With GitOps repo
sloth-kubernetes argocd install my-cluster --repo https://github.com/org/gitops.git

# Check status
sloth-kubernetes argocd status my-cluster

# Get password
sloth-kubernetes argocd password my-cluster

# List apps
sloth-kubernetes argocd apps my-cluster

# Sync all apps
sloth-kubernetes argocd sync my-cluster --all

helm

Execute Helm commands using kubeconfig from a stack. The kubeconfig is automatically retrieved from Pulumi state.

Usage

sloth-kubernetes helm <stack-name> [helm-args...]

Examples

# List all releases
sloth-kubernetes helm my-cluster list

# List releases in all namespaces
sloth-kubernetes helm my-cluster list -A

# Install a chart
sloth-kubernetes helm my-cluster install myapp bitnami/nginx

# Upgrade a release
sloth-kubernetes helm my-cluster upgrade myapp bitnami/nginx

# Add a repository
sloth-kubernetes helm my-cluster repo add bitnami https://charts.bitnami.com/bitnami

# Search for charts
sloth-kubernetes helm my-cluster search repo nginx

# Get release status
sloth-kubernetes helm my-cluster status myapp

# Uninstall a release
sloth-kubernetes helm my-cluster uninstall myapp

# Install with custom values
sloth-kubernetes helm my-cluster install redis bitnami/redis -f values.yaml

# Install in specific namespace
sloth-kubernetes helm my-cluster install nginx bitnami/nginx -n web --create-namespace

kustomize

Execute Kustomize commands for declarative Kubernetes configuration management.

Usage

sloth-kubernetes kustomize <stack-name> [kustomize-args...]

Subcommands

SubcommandDescription
buildBuild a kustomization target
createCreate a new kustomization
editEdit a kustomization file

Examples

# Build kustomization and apply to cluster
sloth-kubernetes kustomize my-cluster build ./overlays/production | \
sloth-kubernetes kubectl my-cluster apply -f -

# Build with specific output
sloth-kubernetes kustomize my-cluster build ./base

# Create new kustomization
sloth-kubernetes kustomize my-cluster create --resources deployment.yaml,service.yaml

# Edit kustomization - add resource
sloth-kubernetes kustomize my-cluster edit add resource configmap.yaml

# Edit kustomization - set image
sloth-kubernetes kustomize my-cluster edit set image nginx=nginx:1.25

addons

Manage Kubernetes cluster addons using GitOps methodology with ArgoCD.

Usage

sloth-kubernetes addons <subcommand> <stack-name> [flags]

Subcommands

SubcommandDescription
bootstrapBootstrap ArgoCD from a GitOps repository
listList installed addons
statusShow ArgoCD and addon status
syncManually trigger ArgoCD sync
templateGenerate example GitOps repository structure

Examples

# Bootstrap ArgoCD with GitOps repo
sloth-kubernetes addons bootstrap my-cluster --repo https://github.com/org/gitops.git

# List installed addons
sloth-kubernetes addons list my-cluster

# Check addon status
sloth-kubernetes addons status my-cluster

# Trigger sync
sloth-kubernetes addons sync my-cluster

# Generate example GitOps structure
sloth-kubernetes addons template --output ./my-gitops-repo

GitOps Repository Structure

The addons system expects this directory structure in your GitOps repo:

gitops-repo/
├── argocd/
│ └── apps/ # ArgoCD Application manifests
│ ├── monitoring.yaml
│ ├── logging.yaml
│ └── ingress.yaml
├── addons/
│ ├── prometheus/ # Prometheus manifests
│ ├── grafana/ # Grafana manifests
│ ├── nginx-ingress/ # Ingress controller
│ └── cert-manager/ # Certificate management
└── README.md

history

View operation history stored in Pulumi stack state. All CLI operations are automatically recorded.

Usage

sloth-kubernetes history <stack-name> [type] [flags]

Flags

FlagDescriptionDefault
--jsonOutput in JSON formatfalse
--limitNumber of records per type10

Operation Types

TypeDescription
backupsBackup create/restore/delete operations
upgradesCluster upgrade operations
healthHealth check results
benchmarksBenchmark runs
nodesNode add/remove/drain operations
vpnVPN join/leave/test operations
argocdArgoCD install/sync operations
addonsAddons bootstrap/install operations
saltSalt command executions
validationValidation check results

Examples

# View all operation history
sloth-kubernetes history my-cluster

# View backup history only
sloth-kubernetes history my-cluster backups

# View upgrade history
sloth-kubernetes history my-cluster upgrades

# View health check history
sloth-kubernetes history my-cluster health

# Output as JSON
sloth-kubernetes history my-cluster --json

# Limit records
sloth-kubernetes history my-cluster --limit 5

Output Example

Operation History for stack: my-cluster
════════════════════════════════════════════════════════════

Backup Operations (last 10):
────────────────────────────────────────
2026-01-05 10:30:00 create daily-backup-001 success 2m 15s
2026-01-05 08:00:00 create scheduled-backup success 1m 45s

Upgrade Operations (last 10):
────────────────────────────────────────
2026-01-04 15:00:00 upgrade v1.28.0 → v1.29.0 success 15m 30s

Health Check History (last 10):
────────────────────────────────────────
2026-01-05 11:00:00 healthy 12/12 passed 45s

login

Configure the S3 bucket for storing Pulumi state. Similar to pulumi login but with S3-compatible storage support.

Usage

sloth-kubernetes login [s3://bucket-name] [flags]

Flags

FlagDescriptionRequired
-b, --bucketS3 bucket URLYes
--access-key-idAWS Access Key IDNo
--secret-access-keyAWS Secret Access KeyNo
--regionAWS RegionNo
--endpointS3 endpoint for S3-compatible storageNo

Examples

# Login with S3 bucket URL
sloth-kubernetes login s3://my-pulumi-state-bucket

# Login with bucket flag
sloth-kubernetes login --bucket my-pulumi-state-bucket

# Login with credentials
sloth-kubernetes login s3://bucket \
--access-key-id YOUR_KEY \
--secret-access-key YOUR_SECRET \
--region us-east-1

# Login to MinIO or S3-compatible storage
sloth-kubernetes login s3://bucket \
--endpoint https://minio.example.com \
--access-key-id minio \
--secret-access-key minio123

Configuration File

The backend configuration is stored in ~/.sloth-kubernetes/config:

{
"backend_url": "s3://my-pulumi-state-bucket",
"region": "us-east-1"
}

export-config

Export cluster configuration stored in Pulumi state. Useful for recovering lost config files or auditing deployments.

Usage

sloth-kubernetes export-config <stack-name> [flags]

Flags

FlagDescriptionDefault
-f, --formatOutput format: lisp, json, yaml, metalisp
-o, --outputOutput file pathstdout
--regenerateRegenerate Lisp from stored JSONfalse
--metaAlso show deployment metadatafalse

Examples

# Export config as Lisp (default)
sloth-kubernetes export-config production

# Export config as JSON
sloth-kubernetes export-config production --format json

# Export to a file
sloth-kubernetes export-config production --output recovered-config.lisp

# Regenerate Lisp from stored JSON
sloth-kubernetes export-config production --regenerate

# Export deployment metadata
sloth-kubernetes export-config production --format meta

# Export with metadata included
sloth-kubernetes export-config production --meta

Output Formats

Lisp (default):

(cluster
(metadata
(name "production")
(environment "prod"))
(providers
(digitalocean
(enabled true)
(region "nyc3"))))

JSON:

{
"metadata": {
"name": "production",
"environment": "prod"
},
"providers": {
"digitalocean": {
"enabled": true,
"region": "nyc3"
}
}
}

Meta:

Deployment Metadata
═══════════════════
Stack: production
Deployed: 2026-01-05T10:30:00Z
Last Update: 2026-01-05T15:45:00Z
Nodes: 5 (3 masters, 2 workers)
K8s Version: v1.29.0+rke2r1

pulumi

Execute Pulumi operations using the embedded Automation API. No Pulumi CLI installation required.

Usage

sloth-kubernetes pulumi <command> [flags]

Subcommands

SubcommandDescription
stack listList all stacks
stack outputShow stack outputs
stack exportExport stack state to JSON
stack importImport stack state from JSON
stack infoShow detailed stack information
stack deleteDelete a stack
stack selectSelect current stack
stack currentShow current selected stack
stack renameRename a stack
stack cancelCancel and unlock a stack
previewPreview infrastructure changes
refreshRefresh stack state from cloud

Examples

# List all stacks
sloth-kubernetes pulumi stack list

# Show stack outputs
sloth-kubernetes pulumi stack output --stack production

# Export stack state for backup
sloth-kubernetes pulumi stack export --stack production > backup.json

# Import stack state
sloth-kubernetes pulumi stack import --stack production < backup.json

# Preview changes
sloth-kubernetes pulumi preview --stack production

# Refresh state from cloud
sloth-kubernetes pulumi refresh --stack production

# Get detailed stack info
sloth-kubernetes pulumi stack info --stack production

# Cancel stuck operation
sloth-kubernetes pulumi stack cancel --stack production

config

Manage cluster configuration files.

Usage

sloth-kubernetes config <command> [flags]

Subcommands

SubcommandDescription
generateGenerate example configuration file

Examples

# Generate example config
sloth-kubernetes config generate

# Generate with specific provider
sloth-kubernetes config generate --provider digitalocean

# Generate minimal config
sloth-kubernetes config generate --minimal

# Generate with output file
sloth-kubernetes config generate --output my-cluster.lisp

validate

Validate cluster configuration before deployment.

Usage

sloth-kubernetes validate [flags]

Flags

FlagDescriptionDefault
-c, --configPath to config filecluster.lisp
-v, --verboseShow detailed outputfalse

Validation Checks

  • Lisp S-expression syntax
  • Required fields and metadata
  • Node distribution (masters/workers)
  • Provider configuration
  • Network and VPN settings
  • DNS configuration
  • Resource limits

Examples

# Validate configuration
sloth-kubernetes validate --config cluster.lisp

# Validate with verbose output
sloth-kubernetes validate --config production.lisp --verbose

Output

Validating: cluster.lisp
═══════════════════════════════════════════════════════════

✓ Lisp syntax valid
✓ Metadata complete
✓ Provider configuration valid
✓ Node pools configured (3 masters, 5 workers)
✓ Network settings valid
✓ VPN configuration valid
✓ DNS settings valid

Configuration is valid! Ready for deployment.

list

List all deployed clusters.

Usage

sloth-kubernetes list [flags]

Examples

# List all clusters
sloth-kubernetes list

# Output as JSON
sloth-kubernetes list --json

Output

Deployed Clusters
═════════════════════════════════════════════════════════════
NAME NODES STATUS LAST UPDATE PROVIDER
production 8 healthy 2h ago digitalocean
staging 3 healthy 1d ago linode
development 2 warning 5h ago aws

status

Show detailed cluster status and health information.

Usage

sloth-kubernetes status <stack-name> [flags]

Examples

# Show cluster status
sloth-kubernetes status my-cluster

# Show detailed status
sloth-kubernetes status my-cluster --verbose

Output

Cluster Status: my-cluster
═══════════════════════════════════════════════════════════

Overview:
Status: Healthy
K8s Version: v1.29.0+rke2r1
Nodes: 5 (3 ready, 0 not ready)
Pods: 45 running, 2 pending

Nodes:
NAME STATUS ROLES VERSION
master-1 Ready control-plane v1.29.0+rke2r1
master-2 Ready control-plane v1.29.0+rke2r1
master-3 Ready control-plane v1.29.0+rke2r1
worker-1 Ready worker v1.29.0+rke2r1
worker-2 Ready worker v1.29.0+rke2r1

Resources:
CPU: 45% utilized (18/40 cores)
Memory: 62% utilized (50/80 GB)
Storage: 35% utilized (350/1000 GB)

Environment Variables

Sloth Kubernetes supports these environment variables:

Cloud Provider Credentials

VariableDescriptionExample
DIGITALOCEAN_TOKENDigitalOcean API tokendop_v1_abc123...
LINODE_TOKENLinode API tokenabc123...
AWS_ACCESS_KEY_IDAWS Access Key IDAKIA...
AWS_SECRET_ACCESS_KEYAWS Secret Access KeywJalr...
AWS_SESSION_TOKENAWS Session Token (optional)FwoGZX...
AWS_REGIONAWS Regionus-east-1

State Backend (S3)

VariableDescriptionExample
PULUMI_BACKEND_URLS3 backend URLs3://my-bucket
PULUMI_CONFIG_PASSPHRASEEncryption passphrasemysecret
AWS_S3_ENDPOINTS3-compatible endpointhttps://minio.example.com

SSH Configuration

VariableDescriptionExample
SSH_USERSSH username for nodesubuntu (AWS), root (DO)
SSH_KEY_PATHPath to SSH private key~/.ssh/id_rsa

Salt API

VariableDescriptionExample
SALT_API_URLSalt API endpointhttp://bastion:8000
SALT_USERNAMESalt API usernamesaltapi
SALT_PASSWORDSalt API passwordsaltapi123

Debug & Logging

VariableDescriptionExample
SLOTH_DEBUGEnable debug modetrue
SLOTH_VERBOSEVerbose outputtrue

Exit Codes

CodeMeaning
0Success 🦥
1General error
2Configuration error
3Network error
4API error
5Timeout

!!! quote "Sloth Wisdom 🦥" "With great CLIs comes great responsibility... but take your time using them!"