This is the multi-page printable view of this section. Click here to print.
Node Reference Information
1 - Kubelet Checkpoint API
Kubernetes v1.25 [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.
Creating a checkpoint of a container might have security implications. Typically
a checkpoint contains all memory pages of all processes in the checkpointed
container. This means that everything that used to be in memory is now available
on the local disk. This includes all private data and possibly keys used for
encryption. The underlying CRI implementations (the container runtime on that node)
should create the checkpoint archive to be only accessible by the root
user. It
is still important to remember if the checkpoint archive is transferred to another
system all memory pages will be readable by the owner of the checkpoint archive.
Operations
post
checkpoint the specified container
Tell the kubelet to checkpoint a specific container from the specified Pod.
Consult the Kubelet authentication/authorization reference for more information about how access to the kubelet checkpoint interface is controlled.
The kubelet will request a checkpoint from the underlying
CRI implementation. In the checkpoint
request the kubelet will specify the name of the checkpoint archive as
checkpoint-<podFullName>-<containerName>-<timestamp>.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
.
The checkpoint archive is in tar format, and could be listed using an implementation of
tar
. The contents of the
archive depend on the underlying CRI implementation (the container runtime on that node).
HTTP Request
POST /checkpoint/{namespace}/{pod}/{container}
Parameters
-
namespace (in path): string, required
Namespace -
pod (in path): string, required
Pod -
container (in path): string, required
Container -
timeout (in query): integer
Timeout in seconds to wait until the checkpoint creation is finished. If zero or no timeout is specfied the default CRI timeout value will be used. Checkpoint creation time depends directly on the used memory of the container. The more memory a container uses the more time is required to create the corresponding checkpoint.
Response
200: OK
401: Unauthorized
404: Not Found (if the ContainerCheckpoint
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))
2 - Articles on dockershim Removal and on Using CRI-compatible Runtimes
This is a list of articles and other pages that are either about the Kubernetes' deprecation and removal of dockershim, or about using CRI-compatible container runtimes, in connection with that removal.
Kubernetes project
-
Kubernetes blog: Dockershim Removal FAQ (originally published 2020/12/02)
-
Kubernetes blog: Updated: Dockershim Removal FAQ (updated published 2022/02/17)
-
Kubernetes blog: Kubernetes is Moving on From Dockershim: Commitments and Next Steps (published 2022/01/07)
-
Kubernetes blog: Dockershim removal is coming. Are you ready? (published 2021/11/12)
-
Kubernetes documentation: Migrating from dockershim
-
Kubernetes documentation: Container Runtimes
-
Kubernetes enhancement proposal: KEP-2221: Removing dockershim from kubelet
-
Kubernetes enhancement proposal issue: Removing dockershim from kubelet (k/enhancements#2221)
You can provide feedback via the GitHub issue Dockershim removal feedback & issues. (k/kubernetes/#106917)
External sources
-
Amazon Web Services EKS documentation: Amazon EKS is ending support for Dockershim
-
CNCF conference video: Lessons Learned Migrating Kubernetes from Docker to containerd Runtime (Ana Caylin, at KubeCon Europe 2019)
-
Docker.com blog: What developers need to know about Docker, Docker Engine, and Kubernetes v1.20 (published 2020/12/04)
-
"Google Open Source" channel on YouTube: Learn Kubernetes with Google - Migrating from Dockershim to Containerd
-
Microsoft Apps on Azure blog: Dockershim deprecation and AKS (published 2022/01/21)
-
Mirantis blog: The Future of Dockershim is cri-dockerd (published 2021/04/21)
-
Mirantis: Mirantis/cri-dockerd Git repository (on GitHub)
-
Tripwire: How Dockershim’s Forthcoming Deprecation Affects Your Kubernetes (published 2021/07/01)