티스토리 뷰
CLOUD/Kubernetes
[helm3.0] Error: Kubernetes cluster unreachable: invalid configuration: [unable to read client-cert client.crt permission denied... 에러해결 방안
헐리 2021. 7. 20. 18:25helm install <배포 이름> <디렉토리>
명령어를 입력했는데
Error: Kubernetes cluster unreachable: invalid configuration:
[unable to read client-cert /root/.minikube/profiles/minikube/client.crt
for minikube due to open /root/.minikube/profiles/minikube/client.crt: permission denied,
unable to read client-key /root/.minikube/profiles/minikube/client.key
for minikube due to open /root/.minikube/profiles/minikube/client.key: permission denied,
unable to read certificate-authority /root/.minikube/ca.crt
for minikube due to open /root/.minikube/ca.crt: permission denied]
같은 에러가 났다.
sudo chown -R $USER $HOME/.kube $HOME/.minikube
이랬는데도 안됨
권한을 어떻게 해결할깨 생각하다가 그냉 gitlab-runner에 똑같은 파일을 붙여넣기로함
cp /root/.minikube/profiles/minikube/client.crt /home/gitlab-runner
cp /root/.minikube/profiles/minikube/client.key /home/gitlab-runner/
cp /root/.minikube/ca.crt /home/gitlab-runner/
그리고나서 인증할때 /home/gitlab-runner경로에서 읽도록 설정
vim /etc/rancher/k3s/k3s.yaml #부분수정
certificate-authority: /home/gitlab-runner/ca.crt
client-certificate: /home/gitlab-runner/client.crt
client-key: /home/gitlab-runner/client.key
마지막으로 소유권변경
chown gitlab-runner /home/gitlab-runner/client.crt
chown gitlab-runner /home/gitlab-runner/client.key
chown gitlab-runner /home/gitlab-runner/ca.crt
에러해결 완료!!
'CLOUD > Kubernetes' 카테고리의 다른 글
k8s.api.networking.v1.IngressBackend] 에러해결 unknown field "serviceName", unknown field "servicePort" (0) | 2021.08.06 |
---|---|
[Kubernetes] 쿠버네티스에 네임서버 연결해서 도메인 씌우기 (+서브도메인) (0) | 2021.07.30 |
[Kubernetes] Helm Chart 의 함수와 flow controll (0) | 2021.07.20 |
[Kubernetes] Helm Chart의 내장객체와 변수 주입 (0) | 2021.07.20 |
[Kubernetes] Helm Chart & Repository 등록과 배포 (0) | 2021.07.20 |