본문 바로가기
Kubernetes

plugin type="calico" failed (add): error getting ClusterInformation: connection is unauthorized: Unauthorized

by 정윤재 2024. 3. 15.

1. 현상

kubernetes 에서 pod 가 ContainerCreating 상태이고

kubectl describe pod 로 확인 하면

 

Events:
  Type     Reason                  Age   From               Message
  ----     ------                  ----  ----               -------
  Normal   Scheduled               15s   default-scheduler  Successfully assigned kube-system/nfs-provisioner-nfs-subdir-external-provisioner-77dbf65d78fcn72 to k8sworker1
  Warning  FailedCreatePodSandBox  15s   kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "f6e9426edd6238cc2a0897d8d25033f4721dae9a4ef6ab27fe4322454145d5e1": plugin type="calico" failed (add): error getting ClusterInformation: connection is unauthorized: Unauthorized

 

위와 같이 메시지가 나오면서 문제가 발생 할 때

 

2. 해결 방법

kubectl get pod -o wide 로 해당 pod 가 떠 있는 node 를 확인 후

해당 node 에 떠 있는 cni (calico) 를 재기동 해주면 해결 됨


댓글