We are trying to take a snapshot of a container with the Kubernetes Container checkpointing feature.
Environment: minikube
runtime-contaner: crio
We tried the following:
Start a new profile in minikube setting the ContainerCheckpoint feature flag:
minikube start --container-runtime=crio --feature-gates=ContainerCheckpoint=true -p criupoc
Review configuration to make sure that the feature gate is setup correctly:
vim ~/.minikube/profiles/criupoc/config.json
Created nginx pod and verify that it's running:
kubectl apply -f https://k8s.io/examples/pods/simple-pod.yaml kubectl get pods
Try the checkpointing feature as advised in the documentation (already linked above):
curl --insecure --cert ~/.minikube/profiles/criupoc/client.crt --key ~/.minikube/profiles/criupoc/client.key -X POST "https://<MINIKUBEIP_PLACEHOLDER>:10250/checkpoint/default/nginx/nginx"
Expected: checkpoint is taken
Actual: checkpointing of default/nginx/nginx failed (rpc error: code = Unimplemented desc = unknown method CheckpointContainer for service runtime.v1.RuntimeService)
Notes:
- I tried this with the docker container-runtime (in minikube) too, with the same results. As per containerd, it seems like it doesn't support CRIU yet.
- This example, suggests to use also the flag --enable-criu-support=true within cri-o but I have no idea how to set it through minikube or in any other ways.
QUESTION: Could you please provide some insight into this? How could I fix this error or alter my procedure to get a snapshot of the nginx container?
As it seems that the feature is newly launched, I was only able to gather documentation using containerd. Linking here the documentation where the steps provided on taking a snapshot of container image with checkpoint in containerd.
Attaching here as well a reference documentation about CRIU that you can connect yourself for further updates.