Skip to content

ksail cluster switch

Switch the active kubeconfig context to the named cluster.
This command accepts a cluster name and automatically resolves it to the
correct kubeconfig context by checking all supported distribution prefixes
(kind-, k3d-, admin@, vcluster-docker_).
If multiple distributions have contexts for the same cluster name, the
command returns an error listing the matching contexts.
The kubeconfig is resolved in the following priority order:
1. From KUBECONFIG environment variable
2. From ksail.yaml config file (if present)
3. Defaults to ~/.kube/config
Examples:
# Switch to a Vanilla (Kind) cluster named "dev"
ksail cluster switch dev
# Switch to a cluster named "staging"
ksail cluster switch staging
Usage:
ksail cluster switch <cluster-name> [flags]
Global Flags:
--benchmark Show per-activity benchmark output