본문 바로가기

리눅스

[Kubernetes] kubernetes localhost:8080 was refused 오류

반응형

kubernetes localhost:8080 was refused 오류

$ kubectl get pods
The connection to the server localhost:8080 was refused - did you specify the right host or port?

 

환경 변수 등록

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

 

kubectl get pods 명령 실행

$ kubectl get pods
NAME    READY   STATUS    RESTARTS   AGE
nginx   1/1     Running   0          12h

 

 

728x90
반응형