Welcome to the Linux Foundation Forum!

Lab 6.4 can't execute crioctl run command always fails

Everytime that I run sudo crictl run container-config.json pod-config.json I got
E1123 16:53:51.688239 1912 remote_runtime.go:193] "RunPodSandbox from runtime service failed" err="rpc error: code = DeadlineExceeded desc = context deadline exceeded"
FATA[0004] running container: run pod sandbox: rpc error: code = DeadlineExceeded desc = context deadline exceeded

In systemctl status crio I got:
"CNI plugin not ready. Waiting to create k8s_busybox-sandbox_default_...

I checked the previous labd to check if I missed some step but looks I followed all steps.

After do some checking following google help, I noted that the directory /opt/cni/bin was empty and I got this solution:
# Example for downloading CNI plugins (adjust version as needed)
CNI_VERSION="v1.4.0" # Or the desired version
mkdir -p /opt/cni/bin
curl -L "https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-linux-amd64-${CNI_VERSION}.tgz" | tar -C /opt/cni/bin -xz

after do this, I can see the /opt/cni/bin with:
root@training1:~# ll /opt/cni/bin/
total 78968
drwxrwxr-x 2 root root 4096 Dec 4 2023 ./
drwxr-xr-x 3 root root 4096 Jul 31 2024 ../
-rwxr-xr-x 1 root root 4109351 Dec 4 2023 bandwidth*
-rwxr-xr-x 1 root root 4652757 Dec 4 2023 bridge*
-rwxr-xr-x 1 root root 11050013 Dec 4 2023 dhcp*
-rwxr-xr-x 1 root root 4297556 Dec 4 2023 dummy*
-rwxr-xr-x 1 root root 4736299 Dec 4 2023 firewall*
-rwxr-xr-x 1 root root 4191837 Dec 4 2023 host-device*
-rwxr-xr-x 1 root root 3549866 Dec 4 2023 host-local*
-rwxr-xr-x 1 root root 4315686 Dec 4 2023 ipvlan*
-rwxr-xr-x 1 root root 3636792 Dec 4 2023 loopback*
-rwxr-xr-x 1 root root 4349395 Dec 4 2023 macvlan*
-rwxr-xr-x 1 root root 4085020 Dec 4 2023 portmap*
-rwxr-xr-x 1 root root 4470977 Dec 4 2023 ptp*
-rwxr-xr-x 1 root root 3851218 Dec 4 2023 sbr*
-rwxr-xr-x 1 root root 3110828 Dec 4 2023 static*
-rwxr-xr-x 1 root root 4371897 Dec 4 2023 tap*
-rwxr-xr-x 1 root root 3726382 Dec 4 2023 tuning*
-rwxr-xr-x 1 root root 4310173 Dec 4 2023 vlan*
-rwxr-xr-x 1 root root 4001842 Dec 4 2023 vrf*

and then:
student@training1:~$ sudo crictl run container-config.json pod-config.json
6a418ef8b0d1a766d4237086857cb6873585de79fa6f6d1d3a93adb7775bfbed
student@training1:~$

Did I miss some step? or this step is missed from the lab?

Categories

Upcoming Training