Error: INSTALLATION FAILED: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp [::1]:8080: connect: connection refused 에러 해결 방법
클러스터에 엑세스 하기 위해서는 KUBECONFIG라는 환경 변수를 Kubernetes 구성 파일의 경로로 설정을 해주어야 한다.
따라서 아래와 같은 명령을 통해 외부에서 클러스터에 접근할 수 있도록 설정해준다.
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
위 명령어를 실행하면 해당 에러가 해결되었다.
참고 : https://docs.k3s.io/cluster-access
Cluster Access | K3s
The kubeconfig file stored at /etc/rancher/k3s/k3s.yaml is used to configure access to the Kubernetes cluster. If you have installed upstream Kubernetes command line tools such as kubectl or helm you will need to configure them with the correct kubeconfig
docs.k3s.io
'컨테이너 > Kubernetes' 카테고리의 다른 글
kubernetes Container Timezone Set (쿠버네티스 컨테이너 타임존 설정) 방법 (0) | 2023.04.08 |
---|---|
kubernetes default namespace setting 하기 (0) | 2023.04.04 |
helm 설치 하는 방법 (리눅스) (0) | 2023.03.26 |
Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp [::1]:8080: connect: connection refused 해결 방법 (0) | 2023.03.22 |
k3s ip여러개 일 때 external ip 정하는 방법(Flannel) (0) | 2023.03.18 |