18 lines
546 B
Markdown
18 lines
546 B
Markdown
|
||
```bash
|
||
# 1. 安装 Helm(如果未安装)
|
||
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
||
|
||
# 2. 添加 Rancher Helm 仓库
|
||
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
|
||
|
||
# 3. 创建命名空间
|
||
kubectl create namespace cattle-system
|
||
|
||
# 4. 安装 Rancher(使用自签名证书示例,生产请用 Let's Encrypt)
|
||
helm install rancher rancher-latest/rancher \
|
||
--namespace cattle-system \
|
||
--set hostname=rancher.xiongxiao.me \
|
||
--set ingress.tls.source=secret
|
||
|
||
``` |