首页 > 其他 > 详细

k8s 安装 rancher

时间:2021-08-06 17:53:38      阅读:45      评论:0      收藏:0      [点我收藏+]

title: rancher 安装
tag: [kubernate]
comments: true

参考 https://docs.rancher.cn/docs/rancher2.5/installation/install-rancher-on-k8s/_index

1. 设置 repo

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

2. 为 Rancher 创建 Namespace

kubectl create namespace cattle-system

3. 选择您的 SSL 选项 (使用自己签发的证书)

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,
    先在 shell 执行 export KUBECONFIG=/etc/rancher/k3s/k3s.yaml (参考 https://blog.csdn.net/varyuan/article/details/112111547)

3.1 自有证书需要添加证书

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

k8s 安装 rancher

原文:https://www.cnblogs.com/whm-blog/p/15107994.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!