k3s helm 异常 Error: Kubernetes cluster unreachable原创
金蝶云社区-云社区用户26064194
云社区用户26064194
38人赞赏了该文章 541次浏览 未经作者许可,禁止转载编辑于2023年09月26日 16:36:39
[root@k3s-rancher1 chart]# helm get values rancher -n cattle-system -o yaml > values.yaml
Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused

profile 最后面加上 export KUBECONFIG=/etc/rancher/k3s/k3s.yaml

vim /etc/profile 

export KUBECONFIG=/etc/rancher/k3s/k3s.yaml


source /etc/profile 


 kubectl config view --raw > ~/.kube/config

或者

cp /etc/rancher/k3s/k3s.yaml   ~/.kube/config



赞 38