1.7 KiB
1.7 KiB
本文作者:丁辉
网络源安装Containerd
-
设置存储库
yum install -y yum-utils yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
国内
yum install -y yum-utils yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
-
安装
yum install -y containerd.io
-
备份配置文件
mv /etc/containerd/config.toml /etc/containerd/config.toml.bak containerd config default > /etc/containerd/config.toml
-
修改驱动和镜像地址
vi /etc/containerd/config.toml
内容如下
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc] ... [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options] SystemdCgroup = true #修改这里 [plugins."io.containerd.grpc.v1.cri"] sandbox_image = "registry.aliyuncs.com/google_containers/pause:3.9"
-
配置 crictl 配置文件
curl -so /etc/crictl.yaml https://gitee.com/offends/Kubernetes/raw/main/Containerd/Files/crictl.yaml
-
启动
systemctl enable containerd systemctl start containerd systemctl status containerd