Skip to content

Add pod-level checkpoint/restore support to crictl (KEP-5823)#1997

Draft
adrianreber wants to merge 3 commits intokubernetes-sigs:masterfrom
adrianreber:2026-02-06-KEP-5823
Draft

Add pod-level checkpoint/restore support to crictl (KEP-5823)#1997
adrianreber wants to merge 3 commits intokubernetes-sigs:masterfrom
adrianreber:2026-02-06-KEP-5823

Conversation

@adrianreber
Copy link
Copy Markdown
Contributor

This adds two new crictl commands:

  • checkpointp: Checkpoint one or more running pods to an archive file specified via --export. CLI flags for checkpoint options (e.g., --leave-running) are dynamically built from checkpointctl.SupportedCheckpointOptions, so new options
    added upstream automatically appear as crictl flags.
  • restorep: Restore a pod from a checkpoint image or archive. Supports optional --config for providing a PodSandboxConfig JSON file, --container-config for per-container config files, and --label/--annotation flags for the restored pod
    sandbox.

The CRI API changes (CheckpointPodRequest/CheckpointPodResponse, RestorePodRequest/RestorePodResponse) are manually vendored from the Kubernetes repository until the upstream changes are released.

Also see:

Changes

  • Add checkpointctl dependency at commit 06e23e6d1f24 for pod checkpoint metadata types and SupportedCheckpointOptions
  • Add CheckpointPod and RestorePod CRI API types (vendored from Kubernetes)
  • Implement checkpointp command with dynamically generated option flags from checkpointctl
  • Implement restorep command with --config, --container-config, --label, and --annotation support
  • Pass checkpoint options via CheckpointPodRequest.Options map

Import github.com/checkpoint-restore/checkpointctl at commit
06e23e6d1f24 to provide pod checkpoint metadata types needed
for pod-level checkpoint/restore (KEP-5823).

Generated with Claude Code (https://claude.ai/code)

Signed-off-by: Adrian Reber <areber@redhat.com>
This is part of KEP-5823: Pod-Level Checkpoint/Restore.

Add two new crictl commands for pod-level checkpoint/restore:

- checkpointp: Checkpoint one or more running pods to an archive
  file specified via --export. Sends CheckpointPodRequest to the
  CRI runtime.

- restorep: Restore a pod from a checkpoint image or archive.
  Supports optional --config for providing a PodSandboxConfig
  JSON file, and --label/--annotation flags for setting labels
  and annotations on the restored pod sandbox.

Update the vendored CRI API to include the new CheckpointPod and
RestorePod RPCs:

- CheckpointPodRequest with PodSandboxId and Path fields
- CheckpointPodResponse (empty)
- RestorePodRequest with Path, Config (PodSandboxConfig), and
  RuntimeHandler fields
- RestorePodResponse with PodSandboxId

Generated with Claude Code (https://claude.ai/code)

Signed-off-by: Adrian Reber <areber@redhat.com>
Build checkpointp CLI flags dynamically from
metadata.SupportedCheckpointOptions instead of hardcoding
them. This passes options via the CheckpointPodRequest.Options
map so that new checkpoint options added in checkpointctl
automatically appear as crictl flags.

Generated with Claude Code (https://claude.ai/code)

Signed-off-by: Adrian Reber <areber@redhat.com>
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: adrianreber
Once this PR has been reviewed and has the lgtm label, please assign random-liu for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@adrianreber adrianreber marked this pull request as draft February 23, 2026 16:25
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 23, 2026
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 3, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants