This topic describes the CLI commands for Kompass Storage EZswitch.
All EZswitch commands are invoked via the CLI plugin:
kubectl zesty ezswitch <command> <stsName> [flags]
The following tables describe the commands, flags, and descriptions.
start <stsName>
Starts the migration process, installing EZswitch components (including the Helm chart if not already installed) and creating the EZswitch CR. By default, all ezswitch resources will be on the zesty-ezswitch namespace
Flag | Default | Description |
--autoMigrate | true | Run process automatically to completion if true. |
--stsNamespace | default | Namespace of the original STS. |
--set key=value | (none) | Override Helm chart values during installation. |
--logLevel int | 4 | Set the log level of ezswitch-controller. |
--zestyStsName | <stsName>-zesty | Name of the new Zesty-based STS. |
--helm-namespace | zesty-ezswitch | Namespace where ezswitch resources will be created |
Example:
kubectl zesty ezswitch start myapp-sts --autoMigrate=false --helm-namespace=custom-namespace --set logLevel=4
migrate <stsName>
Resumes the migration if previously halted at ReadyForMigration.
Flag | Default | Description |
--stsNamespace | default | Namespace of the original STS. |
Example:
kubectl zesty ezswitch migrate myapp-sts
pause <stsName>
Pauses the ongoing migration.
Flag | Default | Description |
--stsNamespace | default | Namespace of the original STS. |
Example:
kubectl zesty ezswitch pause myapp-sts
resume <stsName>
Resumes a previously paused migration.
Flag | Default | Description |
--stsNamespace | default | Namespace of the original StatefulSet. |
Example:
kubectl zesty ezswitch resume myapp-sts
abort <stsName>
Aborts the current process before significantly impacting the original StatefulSet and cleans up created resources.
Flag | Default | Description |
--stsNamespace | default | Namespace of the original STS. |
Example:
kubectl zesty ezswitch abort myapp-sts
rollback <stsName>
Attempts to revert to the original state if changes to the StatefulSet have begun. This option is especially relevant at or after the ReadyForMigration phase.
The EZswitch resource from which the migration started must still exist.
The original StatefulSet and its PVCs must still exist.
Flag | Default | Description |
--stsNamespace | default | Namespace of the original STS. |
Example:
kubectl zesty ezswitch rollback myapp-sts
status <stsName>
Displays the current migration status, including phase and sync progress.
Flag | Default | Description |
--stsNamespace | default | Namespace of the original STS. |
Example:
kubectl zesty ezswitch status myapp-sts
For a description of the statuses, see XXXMigration statusesXXX
set <stsName>
Modifies attributes of the EZswitch CR.
Flag | Default | Description |
--autoMigrate=<bool> | true | Updates autoMigrate field. |
--transferRateLimits=Html | -1 | Updates transferRateLimits field (-1 will unset its value, that is, no limit). |
Example:
To Disable automatic migration
kubectl zesty ezswitch set myapp-sts --autoMigrate=false
cleanup <stsName>
Removes the EZswitch CR.
Flag | Default | Description |
--helm-namespace | zesty-ezswitch | Namespace of the original STS. |
--delete-old-sts | false | Deletes the old StatefulSet on cleanup. |
--force-abort | false | Forces abort of all EZswitch resources before cleanup. |
--keep-resources | false | Keeps EZswitch resources instead of deleting them. |
--stsNamespace | default | Namespace of the original STS. |
Example:
kubectl zesty ezswitch cleanup <stsName> [flags]