27 lines
591 B
Bash
Executable File
27 lines
591 B
Bash
Executable File
#!/usr/bin/env
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
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
|
|
|
|
cat <<EOF >/etc/crictl.yaml
|
|
runtime-endpoint: unix:///run/containerd/containerd.sock
|
|
image-endpoint: unix:///run/containerd/containerd.sock
|
|
EOF
|
|
|
|
crictl ps
|