install-k8s-on-ubuntu-2204/install-containerd.sh

20 lines
435 B
Bash
Raw Normal View History

2024-01-27 19:33:25 +02:00
#!/usr/bin/env
2024-01-27 19:54:51 +02:00
export DEBIAN_FRONTEND=noninteractive
2024-01-27 19:33:25 +02:00
apt install -y containerd
mkdir -p /etc/containerd
containerd config default | tee /etc/containerd/config.toml
sed -i -e "s@SystemdCgroup = false@SystemdCgroup = true@g" /etc/containerd/config.toml
echo "net.ipv4.ip_forward=1" > /etc/sysctl.d/010-k8s.conf
echo "br_netfilter" > /etc/modules-load.d/k8s.conf
sysctl --system
modpobe br_netfilter
systemctl restart containerd