Skip to content

kcp migration cutover execute

kcp migration cutover execute

Execute a migration (run the cutover)

Synopsis

Execute a migration: run the cutover described by a migration manifest.

Every run reads the manifest and the live state of the gateway and the cluster link, works out what is left to do, and starts the cutover from its first step. Each step is idempotent, so a migration already partway through cutover re-applies its completed steps as no-ops and continues wherever the live state says work remains. When nothing is left to do (every topic already migrated and no consumer offset-sync restore owed), execute changes nothing and says so. Policy defaults and credentials are read FRESH from the manifest on every run, so they can be varied between runs or overridden with flags.

Each policies value of the declared migration section can be overridden for a single run with its flag, without editing the manifest. A flag that does not apply to the declared migration type is an error. Every flag can also be set through an upper-case environment variable named after it (--lag-threshold is LAG_THRESHOLD), which overrides the manifest in the same way.

If a run is interrupted at any step, simply re-run 'kcp migration cutover execute' — it resumes from the live state.

The manifest's fields, validation rules and a fully-annotated example are documented in the Migration manifest reference.

kcp migration cutover execute [flags]

Examples

  # Run (or resume) the cutover
  kcp migration cutover execute --migration-yaml gateway-static-migration.yaml

  # Override a policy default for this run only (a flag that does not apply to
  # the declared migration type is an error)
  kcp migration cutover execute --migration-yaml gateway-static-migration.yaml --detect-unrouted-producers-duration 60s

Options

      --consumer-offset-sync-drain-duration duration   Override policies.consumerOffsetSyncDrainDuration (staticMigration only): wait after fencing before disabling the link's consumer offset sync. Has no effect unless consumerOffsetSync.pause is set. 0 means no wait.
      --detect-unrouted-commits-duration duration      Override policies.detectUnroutedCommitsDuration (dynamicToStaticConversion only): window between the two committed-offset snapshots taken after fencing a route conversion, to catch a consumer committing to the source directly. 0 skips the check; minimum 10s when set.
      --detect-unrouted-producers-duration duration    Override policies.detectUnroutedProducersDuration (staticMigration, dynamicMigration): window to monitor source offsets after fencing for producers bypassing the gateway. 0 skips the check; minimum 10s when set.
      --dry-run                                        Run only the reconcile step and print its plan report; change nothing. Exits non-zero if the plan is refused.
      --gateway-config-port int                        Override policies.gatewayConfigPort (all migration types): port serving the gateway's /config endpoint, polled per pod to confirm a config revision was applied. Unset, uses the manifest's policies.gatewayConfigPort; 0 means the gateway default (9180).
  -h, --help                                           help for execute
      --hot-reload-timeout duration                    Override policies.hotReloadTimeout (all migration types): max wait for every gateway pod to report the new config revision when the gateway supports hot-reload. Unlike --rollout-timeout this is never unbounded: a hot-reload moves no Kubernetes signal, so 0 uses the built-in 90s budget rather than waiting forever.
      --lag-threshold int                              Override policies.lagThreshold (staticMigration, dynamicMigration): per-topic replication lag (the sum of that topic's partition lags) tolerated before fencing. Every selected topic must be at or below it; 0 means fully caught up.
      --migration-yaml string                          Path to the migration manifest describing this migration.
      --offset-sync-concurrency int                    Override policies.offsetSyncConcurrency (dynamicToStaticConversion only): number of workers (each with its own broker connection) reading and writing consumer-group offsets during a route conversion. 0 uses the built-in 8.
      --promote-batch-size int                         Override policies.promoteBatchSize (staticMigration, dynamicMigration): max mirror topics promoted per batch. 0 promotes all at once.
      --rollout-timeout duration                       Override policies.rolloutTimeout (all migration types): 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

      --verbose   Enable verbose logging to console

SEE ALSO

  • kcp migration cutover - Cut clients over to Confluent Cloud using Cluster Linking and the Confluent Gateway