Cloud/k8s-CKA

[k8s] trouble shooting

jinkwon.kim 2023. 11. 29. 13:14
728x90
반응형

k8s 설치후 node가 NotReady인경우 

cni를 설치 하지 않아서 그렇습니다.

재부팅후 node가 NotReady인 경우

hostname 확인

구축 당시 hostname이  k8s-controlplane이 이거였는데 my-k8s-controlplane 이걸로 변경되어 안된다는 말입니다.

Log

확인 명령어

journalctl -u kubelet.service  -f

문제의 로그

Nov 29 09:12:08 my-k8s-controlplane kubelet[1463]: E1129 09:12:08.248902    1463 controller.go:146] "Failed to ensure lease exists, will retry" err="leases.coordination.k8s.io \"my-k8s-controlplane\" is forbidden: User
 \"system:node:k8s-controlplane\" cannot get resource \"leases\" in API group \"coordination.k8s.io\" in the namespace \"kube-node-lease\": can only access node lease with the same name as the requesting node" interval="
7s"                                                                                                           
Nov 29 09:12:11 my-k8s-controlplane kubelet[1463]: I1129 09:12:11.489503    1463 kubelet_node_status.go:70] "Attempting to register node" node="my-k8s-controlplane"
Nov 29 09:12:11 my-k8s-controlplane kubelet[1463]: E1129 09:12:11.494093    1463 kubelet_node_status.go:92] "Unable to register node with API server" err="nodes \"my-k8s-controlplane\" is forbidden: node \"k8s-controlp
lane\" is not allowed to modify node \"my-k8s-controlplane\"" node="my-k8s-controlplane"                                                                                                                                  
Nov 29 09:12:13 my-k8s-controlplane kubelet[1463]: E1129 09:12:13.709776    1463 eviction_manager.go:262] "Eviction manager: failed to get summary stats" err="failed to get node info: node \"my-k8s-controlplane\" not f
ound"                                                                                                         
Nov 29 09:12:15 my-k8s-controlplane kubelet[1463]: E1129 09:12:15.252193    1463 controller.go:146] "Failed to ensure lease exists, will retry" err="leases.coordination.k8s.io \"my-k8s-controlplane\" is forbidden: User
 \"system:node:k8s-controlplane\" cannot get resource \"leases\" in API group \"coordination.k8s.io\" in the namespace \"kube-node-lease\": can only access node lease with the same name as the requesting node" interval="
7s"                                                                                                                                                  

728x90
반응형

'Cloud > k8s-CKA' 카테고리의 다른 글

[CKA] 49. CKA 시험 후기  (0) 2023.11.19
[CKA] 48. killer.sh  (0) 2023.11.18
[CKA] 47. k8s 문제 풀이 모르는 것 정리  (0) 2023.11.17
[CKA] 46. k8s 문제 풀이(업데이트, 출력형식, PV)  (0) 2023.11.15
[CKA] 45. Troubleshooting  (0) 2023.11.07