Skip to content

ksail cluster list

List all Kubernetes clusters managed by KSail.
By default, lists clusters from all distributions on the default providers
(Docker, Hetzner, Omni). Use --provider to list a specific provider instead,
including one outside the default set such as AWS or Kubernetes.
Output Format:
PROVIDER DISTRIBUTION CLUSTER STATUS
docker Vanilla dev-cluster Running
docker K3s test-cluster Stopped
hetzner Talos prod-cluster Unknown
The STATUS column reports the cluster's run-state: "Running" when its nodes are
up, "Stopped" when they exist but are not running (e.g. a stopped Docker
cluster), and "Unknown" for providers that cannot report it (cloud providers).
Without --provider, kubeconfig contexts that match no cluster found on the
default providers are also listed with STATUS "Unmanaged" (blank
PROVIDER/DISTRIBUTION), so they are visible on the CLI just as in the web UI.
"Unmanaged" means "not found on the providers queried", not "not created by
KSail": a cluster KSail created on AWS or Kubernetes is not queried by default,
so it is listed as Unmanaged; list it with --provider to see it as managed.
When any cluster has a TTL set, a TTL column is appended:
PROVIDER DISTRIBUTION CLUSTER STATUS TTL
docker K3s dev-cluster Running 2h 30m
The PROVIDER and CLUSTER values from the output can be used directly
with other cluster commands:
ksail cluster delete --name <cluster> --provider <provider>
ksail cluster stop --name <cluster> --provider <provider>
Use --output json for machine-readable output. The JSON is an array of objects:
[
{"name": "dev", "provider": "docker", "distribution": "Vanilla", "status": "Running", "ttl": "2h 30m"}
]
The "status" field is "Running", "Stopped", "Unknown", or "Unmanaged" (see the STATUS column).
The "ttl" field is null when no TTL is set and "EXPIRED" once the TTL has elapsed.
Examples:
# List all clusters
ksail cluster list
# List only Docker-based clusters
ksail cluster list --provider Docker
# List only Hetzner clusters
ksail cluster list --provider Hetzner
# List only Omni clusters
ksail cluster list --provider Omni
# Machine-readable JSON (name/provider/distribution/ttl)
ksail cluster list --output json
Usage:
ksail cluster list [flags]
Flags:
--output string Output format: text or json. Use json for machine-readable structured output (array of {name, provider, distribution, status, ttl}). (default "text")
-p, --provider Provider Filter by provider (Docker, Hetzner, Omni, AWS, GCP, Azure, Kubernetes). If not specified, lists the default providers (Docker, Hetzner, Omni).
Global Flags:
--benchmark Show per-activity benchmark output
--config string Path to config file (default: ksail.yaml found via directory traversal)
--experimental Enable experimental (unstable) commands and features