1.环境
ubuntu20.04,只安装了containerd,没有部署k8s集群,运行以下命令报错:
nerdctl -n k8s.io run nginx-test-cd nginx:latest
2.报错内容:
FATA[0000] needs CNI plugin "bridge" to be installed in CNI_PATH ("/opt/cni/bin"), see https://github.com/containernetworking/plugins/releases: exec: "/opt/cni/bin/bridge": stat /opt/cni/bin/bridge: no such file or directory
3.解决方法:
下载CNI包
https://github-releases.githubusercontent.com/84575398/c4d78380-69fe-11eb-984a-b4eaa7163c36?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210806%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210806T082405Z&X-Amz-Expires=300&X-Amz-Signature=c6d56ae2995ae14e4ca80f0da609e7438645b2ead928dc6a8cb0f01709ff7fdc&X-Amz-SignedHeaders=host&actor_id=36498442&key_id=0&repo_id=84575398&response-content-disposition=attachment%3B filename%3Dcni-plugins-linux-amd64-v0.9.1.tgz&response-content-type=application%2Foctet-stream
解压到 /opt/cni/bin