Kubernetes/Kubernetes 에러 경험

Unable to update cni config: no networks found in /etc/cni/net.d 에러

이쿠우우 2021. 1. 12. 21:00
반응형

 

 

 

 

Unable to update cni config: no networks found in /etc/cni/net.d 에러

 

상황

firewalld는 stop하지 않고 일일히 port를 열었고

selinux는 enabled 설정된 상태에서 

kubernetes 설치 중

master node 에서 kubectl init 명령 시 오류 발생

 

 

[오류 메세지]

[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.


        Unfortunately, an error has occurred:
                timed out waiting for the condition


        This error is likely caused by:
                - The kubelet is not running
                - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)


        If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
                - 'systemctl status kubelet'
                - 'journalctl -xeu kubelet'


        Additionally, a control plane component may have crashed or exited when started by the container runtime.
        To troubleshoot, list all containers using your preferred container runtimes CLI.


        Here is one example how you may list all Kubernetes containers running in docker:
                - 'docker ps -a | grep kube | grep -v pause'
                Once you have found the failing container, you can inspect its logs with:
                - 'docker logs CONTAINERID'


error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher

 

journalctl -xeu kubelet 

명령으로 log 확인 결과

W1028 14:35:33.926183    4666 cni.go:239] Unable to update cni config: no networks found in /etc/cni/net.d
E1028 14:35:33.936216    4666 event.go:273] Unable to write event: 'Post "https://172.21.103.189:6443/api/v1/namespaces/default/events": dial tcp 172.21.103.189:6443: connect: connection refused' (may retry after sleeping)
E1028 14:35:33.997695    4666 kubelet.go:2183] node "master.kyp-k8s" not found

 

 

원인

6443 port자체가 열리지 않았었음.

firewalld 설정 문제인줄 알고 firewalld 설정을 건드렸지만

문제가 해결되지 않았었고

selinux enabled 상태였던게 원인이였음.

 

해결책

selinux disabled 설정.

 

추후  selinux enabled 상태에서 정상 설치하는법 알아봐야함.

 

 

 

 


제 글을 복사할 시 출처를 명시해주세요.
글에 오타, 오류가 있다면 댓글로 알려주세요! 바로 수정하겠습니다!


 

반응형