Skip to main content

butlerctl

butlerctl is the CLI for developers and platform users to manage tenant clusters.

Synopsis

butlerctl [command] [flags]

Global Flags

FlagShortDescription
--verbose-vEnable verbose output
--help-hHelp for command

Note: Kubeconfig resolution follows the standard Kubernetes convention: --kubeconfig flag on subcommands, KUBECONFIG environment variable, or ~/.kube/config default. Namespace and output format flags are available on individual subcommands, not globally.


butlerctl cluster

Manage tenant clusters.

butlerctl cluster list

List all accessible tenant clusters.

butlerctl cluster list [flags]

Flags:

FlagShortDescription
--all-namespaces-AList clusters in all namespaces
--namespace-nList clusters in specific namespace

Examples:

# List clusters in current namespace
butlerctl cluster list

# List all clusters (if you have access)
butlerctl cluster list -A

# List clusters in team namespace
butlerctl cluster list -n team-backend

Output:

NAME          NAMESPACE      PHASE   WORKERS   VERSION   AGE
dev-cluster team-backend Ready 3/3 v1.30.0 2d
staging team-backend Ready 5/5 v1.30.0 7d

butlerctl cluster create

Create a new tenant cluster.

butlerctl cluster create <name> [flags]

Flags:

FlagShortDescriptionDefault
--k8s-versionKubernetes versionv1.30.2
--workers-wNumber of worker nodes (1-10)1
--cpuCPU cores per worker (1-128)4
--memoryMemory per worker8Gi
--diskDisk size per worker50Gi
--provider-pProviderConfig name (auto-detected if only one exists)
--imageOS image reference (UUID or namespace/name)
--schematic-idImage Factory schematic ID
--lb-poolLoadBalancer IP pool (SINGLE_IP or START-END)
--lb-pool-startLoadBalancer pool start IP
--lb-pool-endLoadBalancer pool end IP
--pod-cidrPod network CIDR10.244.0.0/16
--service-cidrService network CIDR10.96.0.0/12
--filename-fCreate from YAML file (skips flag validation)
--dry-runPreview TenantCluster YAML without creatingfalse
--waitWait for cluster to reach Readyfalse
--timeoutTimeout for --wait15m

Control plane resource flags (all optional, override ButlerConfig defaults):

FlagDescription
--cp-apiserver-cpu-requestAPI server CPU request (e.g., 100m)
--cp-apiserver-memory-requestAPI server memory request (e.g., 256Mi)
--cp-apiserver-cpu-limitAPI server CPU limit
--cp-apiserver-memory-limitAPI server memory limit
--cp-controller-manager-cpu-requestController manager CPU request
--cp-controller-manager-memory-requestController manager memory request
--cp-controller-manager-cpu-limitController manager CPU limit
--cp-controller-manager-memory-limitController manager memory limit
--cp-scheduler-cpu-requestScheduler CPU request
--cp-scheduler-memory-requestScheduler memory request
--cp-scheduler-cpu-limitScheduler CPU limit
--cp-scheduler-memory-limitScheduler memory limit

Examples:

# Create minimal cluster
butlerctl cluster create dev-cluster --lb-pool 10.40.1.100-10.40.1.110

# Create with custom resources
butlerctl cluster create prod-api \
--k8s-version v1.31.0 \
--workers 5 \
--cpu 8 \
--memory 32Gi \
--disk 200Gi \
--lb-pool-start 10.40.2.100 \
--lb-pool-end 10.40.2.150

# Dry run to preview YAML
butlerctl cluster create dev --dry-run

# Create from YAML file
butlerctl cluster create -f cluster.yaml

# Create and wait for ready
butlerctl cluster create dev \
--lb-pool 10.40.1.100-10.40.1.110 \
--wait --timeout 20m

butlerctl cluster get

Get details about a specific cluster.

butlerctl cluster get <name> [flags]

Examples:

# Get cluster details (table)
butlerctl cluster get dev-cluster

# Get as YAML
butlerctl cluster get dev-cluster -o yaml

# Get as JSON
butlerctl cluster get dev-cluster -o json

butlerctl cluster scale

Scale worker nodes in a cluster.

butlerctl cluster scale <name> [flags]

Flags:

FlagShortDescription
--namespace-nNamespace of the cluster
--workersDesired number of workers (required)
--waitWait for scaling to complete
--timeoutTimeout for --wait

Examples:

# Scale to 5 workers
butlerctl cluster scale dev-cluster --workers 5

# Scale in a specific namespace
butlerctl cluster scale dev-cluster -n team-backend --workers 5

# Scale and wait
butlerctl cluster scale dev-cluster --workers 10 --wait

butlerctl cluster kubeconfig

Get kubeconfig for accessing a tenant cluster.

butlerctl cluster kubeconfig <name> [flags]

Flags:

FlagDescription
--outputWrite to file instead of stdout
--mergeMerge into existing kubeconfig
--set-currentSet as current context (with --merge)

Examples:

# Print kubeconfig to stdout
butlerctl cluster kubeconfig dev-cluster

# Save to file
butlerctl cluster kubeconfig dev-cluster --output ~/.kube/dev-cluster.yaml

# Merge into default kubeconfig
butlerctl cluster kubeconfig dev-cluster --merge

# Use directly with kubectl
butlerctl cluster kubeconfig dev-cluster | kubectl --kubeconfig /dev/stdin get nodes

butlerctl cluster export

Export cluster configuration as clean, git-ready YAML.

Unlike kubectl get -o yaml, this produces clean output suitable for:

  • Checking into Git (GitOps workflows)
  • Using as a template for new clusters
  • Sharing for support/debugging
  • Disaster recovery backups

The output strips all the noise: resourceVersion, uid, creationTimestamp, managedFields, and status.

butlerctl cluster export <name> [flags]

Flags:

FlagShortDescription
--output-oWrite to file or directory instead of stdout
--asRename the cluster in the exported YAML
--allExport all clusters in namespace
--all-namespaces-AExport from all namespaces (with --all)
--include-statusInclude status in output (excluded by default)

Examples:

# Export to stdout
butlerctl cluster export my-cluster

# Export to file
butlerctl cluster export my-cluster -o my-cluster.yaml

# Export as a template with new name
butlerctl cluster export my-cluster --as team-beta-cluster

# Export all clusters to a directory
butlerctl cluster export --all -o clusters/

# Export all clusters from all namespaces
butlerctl cluster export --all -A -o clusters/

# Include status for debugging
butlerctl cluster export my-cluster --include-status

butlerctl cluster destroy

Destroy a tenant cluster.

butlerctl cluster destroy <name> [flags]

Flags:

FlagDescription
--forceSkip confirmation prompt
--waitWait for deletion to complete
--timeoutTimeout for --wait

Examples:

# Destroy with confirmation
butlerctl cluster destroy dev-cluster

# Force destroy (no confirmation)
butlerctl cluster destroy dev-cluster --force

# Destroy and wait
butlerctl cluster destroy dev-cluster --force --wait

butlerctl image

Manage OS images and image sync operations.

Butler uses ImageSync resources to sync OS images (Talos, Flatcar, Rocky, etc.) from the Butler Image Factory to infrastructure providers. These commands manage that lifecycle.

butlerctl image list

List ImageSync resources.

butlerctl image list [flags]

Aliases: ls

Flags:

FlagShortDescriptionDefault
--namespace-nNamespacebutler-system
--output-oOutput format: table, json, yamltable
--providerFilter by provider name
--statusFilter by phase (Pending, Building, Downloading, Uploading, Ready, Failed)
--schematicFilter by schematic ID prefix

Output:

NAME                         PROVIDER         PHASE   SCHEMATIC   VERSION    IMAGE REF              AGE
image-71e06ba7-v1122-hvstr harvester-prod Ready 71e06ba7 v1.12.2 default/talos-v1122 3d
image-f4f34401-v4459-hvstr harvester-prod Ready f4f34401 4459.2.1 default/flatcar-4459 1d

butlerctl image sync

Create an ImageSync to sync an image to a provider.

butlerctl image sync [flags]

Flags:

FlagDescriptionRequired
--schematic-idSchematic ID from the Image FactoryYes
--versionOS version (e.g., v1.12.4)Yes
--providerProvider config reference (namespace/name or name)Yes
--archCPU architecture (default: amd64)No
--formatImage format: qcow2, raw, iso (default: qcow2)No
--transfer-modeTransfer mode: direct, proxy (default: direct)No
--display-nameHuman-readable name for the image on the providerNo
--nameName for the ImageSync resource (auto-generated if not set)No
--namespace -nNamespace (default: butler-system)No

Examples:

# Sync Talos image to Harvester
butlerctl image sync \
--schematic-id 71e06ba76d3cf365bb4ab4d8f8f4fea55a7620811666b9c25623734ab18ddd27 \
--version v1.12.2 \
--provider harvester-prod

# Sync with custom name and format
butlerctl image sync \
--schematic-id f4f3440b79585e90ceeb866544513671b4be94fcf4326fc97bdd136b01a0a1b5 \
--version 4459.2.1 \
--provider harvester-prod \
--format raw \
--display-name "Flatcar 4459.2.1"

butlerctl image status

Get detailed status of an ImageSync.

butlerctl image status <name> [flags]

Flags:

FlagShortDescription
--namespace-nNamespace (default: butler-system)
--output-oOutput format: yaml, json

butlerctl image delete

Delete an ImageSync resource. This stops the sync process but does not remove the image from the provider.

butlerctl image delete <name> [flags]

Flags:

FlagShortDescription
--namespace-nNamespace (default: butler-system)
--yes-ySkip confirmation prompt

butlerctl image catalog

Show available images from existing ImageSync resources.

butlerctl image catalog [flags]

Output:

SCHEMATIC   VERSIONS          FORMATS     READY   TOTAL
71e06ba7 v1.12.2, v1.12.1 qcow2 2 2
f4f34401 4459.2.1 raw 1 1

butlerctl version

Print version information.

butlerctl version

Output:

butlerctl version v0.1.0
Built: 2026-01-15T10:00:00Z
Git commit: abc1234
Go version: go1.24.6

Exit Codes

CodeDescription
0Success
1General error
2Configuration error
3Resource not found
4Permission denied

See Also