Upgrade Containerd on Ubuntu 20.04

Kubernetes 1.26 requires Containerd > 1.6 but the highest version in the Ubuntu 20.04 repos is 1.5.x. The following instructions will get a 20.04 host ready to upgrade to Kubernetes 1.26.

The following instructions assume you are running as root

 1
 2mkdir -p /etc/apt/keyrings
 3curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
 4
 5echo \
 6  "deb [arch=$(dpkg --print-architecture) \
 7  signed-by=/etc/apt/keyrings/docker.gpg] \
 8  https://download.docker.com/linux/ubuntu \
 9  $(lsb_release -cs) stable" | \
10  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
11
12apt update
13apt install containerd.io
14
15systemctl restart containerd
16
17mv /etc/containerd/config.toml /etc/containerd/config.toml.orig
18containerd config default | sudo tee /etc/containerd/config.toml
19sed -i 's/SystemdCgroup \= false/SystemdCgroup \= true/g' /etc/containerd/config.toml
20
21wget https://github.com/containernetworking/plugins/releases/download/v1.1.1/cni-plugins-linux-amd64-v1.1.1.tgz
22
23mkdir -p /opt/cni/bin
24tar Cxzvf /opt/cni/bin cni-plugins-linux-amd64-v1.1.1.tgz
25
26systemctl restart containerd
comments powered by Disqus