helm repo add rancher-<CHART_REPO> http://rancher-mirror.oss-cn-beijing.aliyuncs.com/server-charts/<CHART_REPO>
替换为 stable
helm repo add rancher-stable http://rancher-mirror.oss-cn-beijing.aliyuncs.com/server-charts/stable
kubectl create namespace cattle-system
helm install rancher rancher-stable/rancher --namespace cattle-system --set hostname=k3s.stu77.cn --set replicas=1 --set ingress.tls.source=secret
Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
Error: Kubernetes cluster unreachable: the server could not find the requested resource
,export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
(参考 https://blog.csdn.net/varyuan/article/details/112111547)kubectl -n cattle-system create secret tls tls-rancher-ingress --cert=/etc/letsencrypt/live/stu77.cn-0001/fullchain.pem --key=/etc/letsencrypt/live/stu77.cn-0001/privkey.pem
原文:https://www.cnblogs.com/whm-blog/p/15107994.html