First, install some pre-requisites for containerd
:
$ sudo apt-get update \
&& sudo apt-get install -y apt-transport-https \
ca-certificates curl software-properties-common
The overlay
and br_netfilter
modules are required to be loaded:
$ cat <
br_netfilter
EOF
$ sudo modprobe overlay \
&& sudo modprobe br_netfilter
Setup the required sysctl
parameters and make them persistent:
$ cat <
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
EOF
$ sudo sysctl —system
Now proceed to setup the Docker repository:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key —keyring /etc/apt/trusted.gpg.d/docker.gpg add -
$ sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable”
Install containerd
:
$ sudo apt-get update \
&& sudo apt-get install -y containerd.io
Create a default config.toml
:
$ sudo mkdir -p /etc/containerd \
&& sudo containerd config default | sudo tee /etc/containerd/config.toml
Configure containerd
to use the systemd
cgroup driver with runc
by editing the configuration file and adding this line:
[plugins.”io.containerd.grpc.v1.cri”.containerd.runtimes.runc.options]
SystemdCgroup = true
Now restart the daemon:
$ sudo systemctl restart containerd