본문 바로가기
오류 해결

k8s root 계정 이외의 계정에서 kubectl get all 안될때 오류해결

by 21세기 김작가 2022. 1. 25.

에러 메세지:

# kubectl get pods
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")

아래 페이지 참조

https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/

 

 

해결방법

unset KUBECONFIG
export KUBECONFIG=/etc/kubernetes/admin.conf
sudo chmod 777 /etc/kubernetes/admin.conf