-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Add documentation for container checkpointing feature (KEP 2008) #31753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
adrianreber
wants to merge
1
commit into
kubernetes:dev-1.24
from
adrianreber:2022-02-15-forensic-container-checkpointing-documentation
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
content_type: "reference" | ||
title: Kubelet Checkpoint API | ||
weight: 10 | ||
--- | ||
|
||
|
||
{{< feature-state for_k8s_version="v1.24" state="alpha" >}} | ||
|
||
Checkpointing a container is the functionality to create a stateful copy of a | ||
running container. Once you have a stateful copy of a container, you could | ||
move it to a different computer for debugging or similar purposes. | ||
|
||
If you move the checkpointed container data to a computer that's able to restore | ||
it, that restored container continues to run at exactly the same | ||
point it was checkpointed. You can also inspect the saved data, provided that you | ||
have suitable tools for doing so. | ||
|
||
## Operations {#operations} | ||
|
||
### `post` checkpoint the specified container {#post-checkpoint} | ||
|
||
Tell the kubelet to checkpoint a specific container from the specified Pod. | ||
|
||
Consult the [Kubelet authentication/authorization reference](/docs/reference/command-line-tools-reference/kubelet-authentication-authorization) | ||
for more information about how access to the kubelet checkpoint interface is | ||
controlled. | ||
|
||
sftim marked this conversation as resolved.
Show resolved
Hide resolved
|
||
The kubelet will request a checkpoint from the underlying | ||
{{<glossary_tooltip term_id="cri" text="CRI">}} implementation. In the checkpoint | ||
request the kubelet will specify the name of the checkpoint archive as | ||
`<containerID>.tar` and also request to store the checkpoint archive in the | ||
`checkpoints` directory below its root directory (as defined by `--root-dir`). | ||
This defaults to `/var/lib/kubelet/checkpoints`. If an existing checkpoint | ||
archive will be overwritten depends on the underlying CRI implementation. | ||
|
||
The checkpoint archive is in _tar_ format, and could be listed using an implementation of | ||
[`tar`](https://pubs.opengroup.org/onlinepubs/7908799/xcu/tar.html). The contents of the | ||
archive depend on the underlying CRI implementation (the container runtime on that node). | ||
|
||
#### HTTP Request {#post-checkpoint-request} | ||
|
||
POST /checkpoint/{namespace}/{pod}/{container} | ||
|
||
#### Parameters {#post-checkpoint-params} | ||
|
||
- **namespace** (*in path*): string, required | ||
|
||
{{< glossary_tooltip term_id="namespace" >}} | ||
|
||
- **pod** (*in path*): string, required | ||
|
||
{{< glossary_tooltip term_id="pod" >}} | ||
|
||
- **container** (*in path*): string, required | ||
|
||
{{< glossary_tooltip term_id="container" >}} | ||
|
||
#### Response {#post-checkpoint-response} | ||
|
||
200: OK | ||
|
||
401: Unauthorized | ||
|
||
404: Not Found (if the `CheckpointContainer` feature gate is disabled) | ||
|
||
404: Not Found (if the specified `namespace`, `pod` or `container` cannot be found) | ||
|
||
500: Internal Server Error (if the CRI implementation encounter an error during checkpointing (see error message for further details)) | ||
|
||
500: Internal Server Error (if the CRI implementation does not implement the checkpoint CRI API (see error message for further details)) | ||
|
||
{{< comment >}} | ||
TODO: Add more information about return codes once CRI implementation have checkpoint/restore. | ||
{{< /comment >}} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.