쿠버네티스 couldn't get current server API group 에러

greenTea·2023년 8월 14일
0

couldn't get current server API group 에러

😭쿠버네티스 설치 후 kubectl get nodes 실행시 아래와 같은 에러가 발생한다면

문제 발생

...생략
couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused
couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused
couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused
...생략

해결 방법

아래 명령어를 실행해주시면 됩니다.

명령어

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/kubelet.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

🫠위 명령어를 통해 Kubernetes 클러스터와 상호 작용하기 위한 설정 파일을 사용자의 홈 디렉토리에 저장하게 됩니다.

위 과정을 거친 후 다시 kubectl get nodes를 치신다면 제대로 나오는 것을 확인 할 수 있습니다.

profile
greenTea입니다.

0개의 댓글