安装容器运行时Containerd v1.4.3

  sre

rkDhFJ.jpg
安装 runc

curl -OL https://github.com/opencontainers/runc/releases/download/v1.0.0-rc92/runc.amd64
mv runc.amd64 /usr/local/bin/runc && chmod +x /usr/local/bin/runc

下载 Containerd 安装包

curl -OL https://github.com/containerd/containerd/releases/download/v1.4.3/containerd-1.4.3-linux-amd64.tar.gz
tar -zxvf containerd-1.4.3-linux-amd64.tar.gz -C /usr/local
curl -o /etc/systemd/system/containerd.service https://raw.githubusercontent.com/containerd/cri/master/contrib/systemd-units/containerd.service

配置 Containerd

mkdir -p /etc/containerd
cat > /etc/containerd/config.toml << EOF
[plugins]
  [plugins."io.containerd.grpc.v1.cri"]
    sandbox_image = "kubesphere/pause:3.2"
    [plugins."io.containerd.grpc.v1.cri".registry]
      [plugins."io.containerd.grpc.v1.cri".registry.mirrors]
        [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
          endpoint = ["https://registry-1.docker.io"]     ## 这里可替换成dockerhub的镜像加速器
EOF
systemctl enable containerd && systemctl restart containerd

安装 crictl

VERSION="v1.19.0"
curl -OL https://github.com/kubernetes-sigs/cri-tools/releases/download/VERSION/crictl-VERSION-linux-amd64.tar.gz
sudo tar zxvf crictl-VERSION-linux-amd64.tar.gz -C /usr/local/bin
rm -f crictl-VERSION-linux-amd64.tar.gz

配置 crictl

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

One Reply to “安装容器运行时Containerd v1.4.3”

LEAVE A COMMENT

Captcha Code