castctl command reference
Every castctl command and flag, in one place, for connecting, disconnecting, migrating, and importing existing node configuration.
Every castctl command and its flags, for lookup. For step-by-step guides, see Connect using the castctl CLI, Migrate standalone Helm charts with castctl, and Import and apply cluster configuration with castctl.
Every command also accepts castctl <command> --help for the flags currently supported by your installed version.
castctl auth login
Authenticates castctl with your Cast AI account and stores the token in ~/.config/castctl/config.yaml. Takes no flags. Run it again to switch accounts or organizations.
castctl cluster connect
| Flag | Description |
|---|---|
--dry-run | Resolve and print the configuration as YAML without registering the cluster or making changes. |
--non-interactive | Skip prompts; combine with feature-toggle flags for CI. |
--provider anywhere | Connect a cluster outside EKS, GKE, or AKS via Cast AI Anywhere. |
--umbrella-values-file <path> | Merge a YAML file of Helm values into the umbrella chart install. |
--import-config | After a successful connect, run node-group discovery and import it as node configurations and node templates. See Import and apply cluster configuration with castctl. |
Feature-toggle flags (for example --cluster-optimization, --workload-autoscaler) and cloud-credential flags vary by provider. Run castctl cluster connect --help for the complete, current list.
See Connect using the castctl CLI.
castctl cluster disconnect
No flags are required for the common case: castctl reads the cluster ID from the in-cluster configuration. Run castctl cluster disconnect --help for flags that skip cloud cleanup or the Kubernetes uninstall.
See Connect using the castctl CLI.
castctl cluster migrate
| Flag | Description |
|---|---|
--yes | Skip the interactive confirmation prompt. |
--umbrella-version <version> | Install a specific umbrella chart version instead of the latest stable. |
--values-dump-path <path> | On failure, write the preserved standalone release values to this path instead of the default castai-migrate-values-<timestamp>.yaml. |
--values-file <path> | Recovery mode: skip standalone detection and uninstall, and install the umbrella chart using the values in this file. |
See Migrate standalone Helm charts with castctl.
castctl cluster import-config
| Flag | Description |
|---|---|
--cluster-id <id> | Cast AI cluster ID. Auto-detected from the cluster in your kubeconfig if not provided. |
--file <path> | Write the discovered plan to a file instead of applying it. |
--output <format> | Plan serialization when --file is set: yaml (default) or tf (apply-ready Terraform). |
--non-interactive | Skip the interactive review and apply the discovered plan directly. |
See Import and apply cluster configuration with castctl.
castctl cluster apply-config
| Flag | Description |
|---|---|
--file <path> | Plan file to apply. Required. apiVersion, kind, and metadata.clusterId are validated before anything is applied. |
castctl version
Prints the installed castctl version. Takes no flags.
See also
Updated 1 hour ago
