rancher 的 ha 模式一直使用的是helm
snap install helm --classic
添加库
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
创建命名空间,安装 cert manager
kubectl create namespace cattle-system
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.0.4/cert-manager.crds.yaml
kubectl create namespace cert-manager
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install \
cert-manager jetstack/cert-manager \
--namespace cert-manager \
--version v1.0.4
确认cert manager安装成功
kubectl get pods --namespace cert-manager
添加本地 dns,用来访问rancher控制台
192.168.204.145 rancher.lizhe
安装rancher
helm install rancher rancher-latest/rancher \
--namespace cattle-system \
--set hostname=rancher.lizhe
等待安装完成
kubectl -n cattle-system rollout status deploy/rancher
访问rancher