install

yum install yum-utils device-mapper-persistent-data lvm2 iproute-tc -y
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install containerd.io -y

修改配置文件

containerd config default > /etc/containerd/config.toml
# 修改 cgroups 为 systemd
sed -i 's#SystemdCgroup = false#SystemdCgroup = true#' /etc/containerd/config.toml
# 修改 pause 镜像地址
sed -i 's#k8s.gcr.io#registry.aliyuncs.com/google_containers#' /etc/containerd/config.toml
# 修改容器存储路径到空间比较充裕的路径
#root = "/var/lib/containerd"

配置 /etc/crictl.yaml,修改 sock 地址

cat <<EOF> /etc/crictl.yaml 
runtime-endpoint: unix:///run/containerd/containerd.sock
image-endpoint: unix:///run/containerd/containerd.sock
timeout: 10
debug: false
EOF

start

systemctl enable containerd
systemctl daemon-reload
systemctl restart containerd
systemctl status containerd

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code