使用 CRIO 在 Minikube 上设置容器检查点

问题描述 投票:0回答:1

我们正在尝试使用 Kubernetes 容器检查点功能拍摄容器快照。

环境:minikube

运行时容器:crio

我们尝试了以下方法:

  1. 在 minikube 中启动一个新配置文件,设置 ContainerCheckpoint 功能标志:

    minikube start --container-runtime=crio --feature-gates=ContainerCheckpoint=true -p criupoc

  2. 检查配置以确保功能门设置正确:

    vim ~/.minikube/profiles/criupoc/config.json

  3. 创建了 nginx pod 并验证其是否正在运行:

    kubectl apply -f https://k8s.io/examples/pods/simple-pod.yaml kubectl 获取 pods

  4. 按照文档中的建议尝试检查点功能(上面已链接):

    curl --insecure --cert ~/.minikube/profiles/criupoc/client.crt --key ~/.minikube/profiles/criupoc/client.key -X POST "https://:10250/checkpoint/default /nginx/nginx”

预期:已采取检查点

实际:default/nginx/nginx 的检查点失败(rpc 错误:代码 = 未实现的 desc = 服务运行时.v1.RuntimeService 的未知方法 CheckpointContainer)

注释

  • 我也用 docker 容器运行时(在 minikube 中)尝试过这个, 具有相同的结果。根据containerd,似乎没有 还支持CRIU吗
  • 这个例子,建议在 cri-o 中使用 --enable-criu-support=true 标志,但我不知道如何通过 minikube 或以任何其他方式设置它。

问题: 您能否对此提供一些见解?我该如何修复此错误或更改我的程序来获取 nginx 容器的快照?

minikube checkpointing cri-o criu
1个回答
0
投票

由于该功能似乎是新推出的,因此我只能使用containerd收集文档。在此处链接文档,其中提供了在containerd中使用检查点拍摄容器映像快照的步骤。

在此附上有关 CRIU 的参考文档,您可以自行联系以获取进一步更新。

© www.soinside.com 2019 - 2024. All rights reserved.