https://github.com/kubernetes-sigs/cri-tools/releases/
# 定义要下载命令文件的目录
# 定义变量 CRICTL_VERSION 和 ARCH
DOWNLOAD_DIR=/usr/local/bin
sudo mkdir -p $DOWNLOAD_DIR
CRICTL_VERSION="v1.24.2"
ARCH="amd64"
# 由于网络原因,这里没有直接使用 github.com 的压缩包地址,而是使用镜像代理下载压缩包。
# curl -L "https://github.com/kubernetes-sigs/cri-tools/releases/download/$/crictl-$-linux-$.tar.gz" | sudo tar -C $DOWNLOAD_DIR -xz
#报错添加配置
cat <<EOF> /etc/crictl.yaml
runtime-endpoint: unix:/run/containerd/containerd.sock
image-endpoint: unix:///run/containerd/containerd.sock
timeout: 10
debug: false
pull-image-on-create: false
disable-pull-on-run: false
EOF
chmod +x /usr/local/bin/crictl
crictl --config /etc/crictl.yaml
#删除
rm -rf /usr/local/bin/crictl
rm -rf /etc/crictl.yaml
apt search containerd
apt install containerd.io
#docker 默认安装了containerd
containerd config default > /etc/containerd/config.toml
systemctl start containerd
systemctl enable containerd
# 修改cgroups为systemd
sed -i 's#SystemdCgroup = false#SystemdCgroup = true#' /etc/containerd/config.toml
systemctl daemon-reload
systemctl restart containerd
https://computingforgeeks.com/install-cri-o-container-runtime-on-debian-linux/
OS=Debian_11
CRIO_VERSION=1.24
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /"|sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
echo "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/ /"|sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$CRIO_VERSION.list
curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$CRIO_VERSION/$OS/Release.key | sudo apt-key add -
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | sudo apt-key add -
sudo apt update
sudo apt upgrade
apt install cri-o cri-o-runc
apt show cri-o
systemctl start crio.service
apt search cri-tools
apt install cri-tools
crictl info