PodMotion is alpha software (v0.1.0-alpha). APIs and behaviors may change without notice. Not recommended for production workloads.

CRD / Interface Reference

WARNING

There is no kubectl podmotion plugin in this release. PodMotion's only shipped user interface is the PodMigration custom resource applied with kubectl apply. A kubectl migrate plugin is described in docs/kubectl-migrate-proposal.md (Status: Draft, 2026-06-09) and is proposed — not yet shipped. Everything in that proposal is unimplemented.

The shipped interface: kubectl apply

You drive a migration by applying a PodMigration CR. There is no plugin binary in cmd/ — that directory contains only operator binaries (manager, node agent, a build-tagged scheduler stub, and a chained CNI plugin).

# Create or update a migration
kubectl apply -f podmigration.yaml

# List migrations (shortName pm, category podmotion)
kubectl get pm
kubectl get podmotion

# Inspect status, phase, and conditions
kubectl get podmigration <name> -o yaml

# Cancel/clean up by deleting the resource
kubectl delete podmigration <name>

PodMigration spec fields

The fields below are read directly from the CRD type definition (api/v1alpha1/podmigration_types.go). They are not auto-generated from any cobra command tree — no such tree exists in this repository.

FieldTypeDefaultConstraints
podNamestringRequired
podNamespacestringRequired
sourcePodUIDstringoptional
targetNodeNamestringoptional; scheduler picks if empty
migrationPolicyRefLocalObjectReferenceoptional
modeenumPreCopyPreCopy | PostCopy | Cold
preCopyMaxRoundsint3251–20
preCopyDirtyThresholdMBint3264min 1
bandwidthLimitMbpsint320min 0 (0 = unlimited)
completionTimeoutSecondsint32600min 30
storageStrategyenumAutoAuto | Skip | Sync | SnapshotClone | DualEngine
tcpPreservationModeenumNoneStrict | BestEffort | None
freezeWindowBudgetMsint3250050–10000
applicationProbeApplicationProbeSpecoptional; protocol SQL/HTTP/gRPC/TCP, timeoutSeconds default 5
dryRunboolfalse
rollbackOnFailurebooltrue
destinationClusterstringreserved post-v1.0 (intra-cluster only)
sourcePodIPstringCalico/Cilium only
affinityModeenumstrictstrict | patch | ignore (patch is post-beta only)

destinationNode is controller-set and should not be specified by users.

WARNING

tcpPreservationMode defaults to None — TCP connection continuity is off by default and the TCPVerifying phase is skipped. Set Strict (hard rollback on continuity failure) or BestEffort (warning only) to opt in.

Status: phases and conditions

status.phase follows the MigrationPhase enum (22 values total — see api/v1alpha1/podmigration_types.go for the complete list). Partial list: Pending, Validating, Checkpointing, PreCopyMemory, SocketInventory, ZeroWindowArm, OverlayHandoff, Transferring, Restoring, RestoreSocketReattach, DisengageHold, TCPVerifying, ServiceVerifying, CutoverComplete, Complete, DryRunComplete, Failed, RollingBack.

status.conditions uses these exported condition types (podmigration_types.go):

SocketInventoryComplete        DestinationNetnsReady
ZeroWindowArmed                ZeroWindowDisarmed
VXLANFDBUpdated                TCPSequenceContinuityVerified
ConnectionCountParity          RelayProgramsLoaded
RelayArmed                     OverlayReady
TCPVerified                    ServiceVerified
SocketsLive                    ProcessResumedAfterSocketsLive

TCPVerified is the aggregate TCP gate. TCPSequenceContinuityVerified=True corresponds to seq_delta=0 (zero dropped TCP sequence numbers). SocketsLive / ProcessResumedAfterSocketsLive enforce the SIGCONT-after-sockets-live ordering invariant.

Proposed CLI (not shipped)

docs/kubectl-migrate-proposal.md (Draft) outlines a future three-phase roadmap: an operator-provided kubectl-podmotion plugin (in an external repo, not in this tree), a SIG-CLI KEP for a built-in kubectl migrate gated behind KUBECTL_MIGRATE=1, and an upstream migration.k8s.io API object. All proposed flags (--to-node, --dry-run, --wait, --strategy, …) are unimplemented, and the proposal's field names (sourcePodName/sourcePod) do not match the real CRD (podName/podNamespace). Use kubectl apply until a plugin ships.