When openshift / kubernetes cluster is bootsrapped and all the nodes are ready and available, sometimes worker or master nodes gives error “No CNI configuration file in /etc/cni/net.d/ condition remains after CNI has been configured”.
# oc get nodes
NAME STATUS ROLES AGE VERSION
okd-comp-1 NotReady worker 3h44m v1.18.3
okd-comp-2 Ready worker 3h28m v1.18.3
okd4-cp-1 Ready master 8h v1.18.3
okd4-cp-2 Ready master 8h v1.18.3
okd4-cp-3 Ready master 8h v1.18.3
Fix: No CNI configuration file in /etc/cni/net.d/
Login to the worker node and restart crio and kubelet services. Restarting crio should do the job but we can also restart kubelet services so that it can reflect the status on master.
#ssh [email protected] (ip of affected worker node)
ssh can be done from infra or service node only.
#sudo systemctl restart crio
#sudo systemctl restart kubelet
#sudo systemctl status crio
#sudo systemctl status crio
● crio.service - MCO environment configuration
Loaded: loaded (/usr/lib/systemd/system/crio.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/crio.service.d
└─10-mco-default-env.conf
Active: active (running) since Wed 2022-02-16 06:53:16 UTC; 9s ago
Docs: https://github.com/cri-o/cri-o
Main PID: 384108 (crio)
Tasks: 51
Memory: 71.1M
CPU: 18.992s
CGroup: /system.slice/crio.service
├─384108 /usr/bin/crio
├─387108 /usr/libexec/crio/conmon -c 86690fd7c93c8fe6dc0fff9529e50784f9d2345727f5a7cd4d9801ee32b7f1cc -n k8s_prometheus_prometheus-k8s->
├─387163 /usr/libexec/crio/conmon -c 3eeedde9d69f99e39c276a62ba198aefbd3351b4e953fa1990976acb772055da -n k8s_sdn_sdn-jc5nh_openshift-sd>
├─387166 /usr/bin/runc --root=/run/runc exec --pid-file /tmp/pidfile322794636 --process /tmp/exec-process-294713758 -d 3eeedde9d69f99e3>
├─387185 sh -c if [ -x "$(command -v curl)" ]; then curl http://localhost:9090/-/healthy; elif [ -x "$(command -v wget)" ]; then wget ->
├─387216 /usr/bin/runc init
└─387228 curl http://localhost:9090/-/healthy
Feb 16 06:53:22 okd-comp-2 crio[384108]: time="2022-02-16 06:53:22.802868044Z" level=info msg="Exec'd [grpc_health_probe -addr=localhost:50051] in o>
Feb 16 06:53:22 okd-comp-2 crio[384108]: time="2022-02-16 06:53:22.856736835Z" level=info msg="Exec'd [sh -c if [ -x \"$(command -v curl)\" ]; then >
Feb 16 06:53:23 okd-comp-2 crio[384108]: time="2022-02-16 06:53:23.498883827Z" level=info msg="Exec'd [sh -c if [ -x \"$(command -v curl)\" ]; then >
Feb 16 06:53:23 okd-comp-2 crio[384108]: time="2022-02-16 06:53:23.956889084Z" level=info msg="Exec'd [sh -c if [ -x \"$(command -v curl)\" ]; then
#oc get nodes
NAME STATUS ROLES AGE VERSION
okd-comp-1 Ready worker 3h44m v1.18.3
okd-comp-2 Ready worker 3h28m v1.18.3
okd4-cp-1 Ready master 8h v1.18.3
okd4-cp-2 Ready master 8h v1.18.3
okd4-cp-3 Ready master 8h v1.18.3