简体   繁体   English

如何将容器数据目录移动到 ubuntu 上的另一个位置?

[英]How to move containerd data directory to another location on ubuntu?

trying copy data from the pod and got尝试从 pod 复制数据并得到

failed to copy: write /var/lib/containerd/io.containerd.content.v1/data: no space left on device

My /var is full and I wanna change the container's root directory, is there a way to change the directory from /var/lib/containerd/ ?我的/var已满,我想更改容器的根目录,有没有办法从/var/lib/containerd/更改目录?

you will need to change the path in the /etc/containerd/config.toml您将需要更改/etc/containerd/config.toml中的路径

version = 2

# persistent data location
root = "/var/lib/containerd" #your_free_path_here

make sure to restart containerd确保重新启动containerd

sudo systemctl restart contained

to check the container version检查容器版本

kubectl get nodes -o wide | grep containerd

environment-container-runtimes 环境容器运行时

containerd-as-a-kubernetes-container-runtime containerd-as-a-kubernetes-container-runtime

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 与 containerd、docker、kubeadm 的根目录相关的问题 - Question related to root directory for containerd, docker, kubeadm 如何在 containerd 中添加港口注册表 - How to add harbor registry in containerd 使用 containerd 的 ctr 作为容器中的另一个用户执行命令 - Execute command as another user in container using containerd's ctr 如果在 Ubuntu 20.04 上安装了 docker-ce 和 containerd,K8s 使用什么 CRI? - If docker-ce and containerd are installed on Ubuntu 20.04, what CRI does K8s use? 如何在旧版本的 kubespray 中在 offline.yml 中设置 containerd - how to set containerd in offline.yml at old version of kubespray 错误:创建 containerd 容器失败:无法加载 seccomp 配置文件,没有这样的文件或目录 - Error: failed to create containerd container: cannot load seccomp profile, no such file or directory 如何将 prometheus 适配器移动到另一个命名空间? - how to move prometheus adapter to another namespace? Kubernetes:如何将 pod 移动到另一个节点 - Kubernetes: How to move a pod to another node 如何将kubernetes集群移动到另一个AWS区域 - How to move kubernetes cluster to another aws zone 如何在 k3os 中解释“/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/”行 - how to interpet "/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/" line in k3os
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM