Compare the desired cluster configuration (ksail.yaml) against the live
cluster state and report any drift.
This command detects installed components via the Kubernetes API and Helm
release history, then compares them against the configuration defined in
ksail.yaml. Changes are classified by impact (in-place, reboot-required,
recreate-required, wipe-required) — the same categories used by
No changes are applied to the cluster; this is a read-only operation.
The cluster is resolved in the following priority order:
1. From the --name flag override
2. From metadata.name in the ksail.yaml config file
3. From the current kubeconfig context
Use --output json for machine-readable output suitable for CI pipelines.
Use --exit-code to return exit code 2 when drift is detected (useful for
CI gates and monitoring scripts).
ksail cluster diff [flags]
-c, --context string Kubernetes context of cluster
--exit-code Return exit code 2 when drift is detected (for CI gates)
-k, --kubeconfig string Path to kubeconfig file (default "~/.kube/config")
-n, --name string Cluster name used for container names, registry names, and kubeconfig context
--output string Output format: text or json. Use json for machine-readable structured output. (default "text")
--benchmark Show per-activity benchmark output
--config string Path to config file (default: ksail.yaml found via directory traversal)