I have installed containerd 1.5.4 by following below steps in CentOS 7.9:
wget -c https://github.com/containerd/containerd/releases/download/v1.5.4/containerd-1.5.4-linux-amd64.tar.gz
tar -zxvf containerd-1.5.4-linux-amd64.tar.gz -C /
mkdir -p /etc/containerd
containerd config default > /etc/containerd/config.toml
I have followed the docs from here and also created the config according to them. But when I try to start containerd:
[root@iZuf62lgwih3vksz3640gnZ sysctl.d]# systemctl start containerd
Failed to start containerd.service: Unit not found.
What should I do to fix this problem?
The main issue is that you are only copying binary files, you are not creating any systemd service.
Be careful when using -C /
flag with the tar
command. On my CentOS 7 machine, two first commands:
wget -c https://github.com/containerd/containerd/releases/download/v1.5.4/containerd-1.5.4-linux-amd64.tar.gz
tar -zxvf containerd-1.5.4-linux-amd64.tar.gz -C /
led to overwrite the /bin
directory which destroyed the OS.
Back to the question, it seems like you are mixing two different instructions for installing containerd
package. The instructions from official Kubernetes wiki that you mentioned in your question are pretty-forward and good to follow. Try them:
Step 1. Install the containerd.io package from the official Docker repositories:
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y containerd.io
Step 2. Configure containerd:
sudo mkdir -p /etc/containerd
containerd config default | sudo tee /etc/containerd/config.toml
Step 3. Restart containerd:
systemctl restart containerd