kcp migration execute
kcp migration execute¶
Execute a migration (run the cutover)
Synopsis¶
Execute a migration: run the cutover described by a GatewayMigration manifest.
The migration must already be registered with 'kcp migration init'. Topology comes from the state file's snapshot, taken at init; policy and credentials are read FRESH from the manifest on every run, so they can be varied between runs.
Each spec.defaultPolicies value can also be overridden for a single run with its flag (e.g. --detect-unrouted-producers-duration), without editing the manifest.
If the manifest's topology no longer matches the snapshot, execute stops rather than silently reconciling. Before the point of no return the answer is to re-run init; once past it — where re-running init would strand the live cutover — execute warns loudly and proceeds with the edited spec, since there is no longer a safe alternative.
If a run is interrupted at any step, re-running 'kcp migration execute' resumes from the last completed step.
Examples¶
# Run (or resume) the cutover
kcp migration execute --migration-yaml gateway-migration.yaml --migration-state-file migration-state.json
# Override a policy default for this run only
kcp migration execute --migration-yaml gateway-migration.yaml --migration-state-file migration-state.json --detect-unrouted-producers-duration 60s
Options¶
--consumer-offset-sync-drain-duration duration Override spec.defaultPolicies.consumerOffsetSyncDrainDuration: wait after fencing before disabling the link's consumer offset sync. Has no effect unless pauseConsumerOffsetSync is set. 0 means no wait.
--detect-unrouted-producers-duration duration Override spec.defaultPolicies.detectUnroutedProducersDuration: window to monitor source offsets after fencing for producers bypassing the gateway. 0 skips the check; minimum 10s when set.
-h, --help help for execute
--lag-threshold int Override spec.defaultPolicies.lagThreshold: total replication lag (sum of all partition lags) tolerated before proceeding.
--migration-id string Address a migration by id instead of by the manifest's metadata.name. Needed only for migrations registered before metadata.name became the identity.
--migration-state-file string Path to the migration-state.json file (produced by kcp migration init).
--migration-yaml string Path to the GatewayMigration manifest describing this migration.
--promote-batch-size int Override spec.defaultPolicies.promoteBatchSize: max mirror topics promoted per batch. 0 promotes all at once.
--rollout-timeout duration Override spec.defaultPolicies.rolloutTimeout: max wait for the operator to report the gateway Ready during fence and switchover (e.g. 10m). 0 means no deadline.
Options inherited from parent commands¶
SEE ALSO¶
- kcp migration - Commands for migrating using CPC Gateway.