Docker部署的Rancher中无法安装Longhorn的问题求助
问题:Rancher部署Longhorn失败及预检查工具无法运行
部署背景
通过Docker命令部署Rancher:
sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher
问题1:Longhorn Helm安装超时
执行Helm命令安装Longhorn时,CRD组件部署成功,但主Chart安装超时:
helm upgrade --install=true --labels=catalog.cattle.io/cluster-repo-name=rancher-charts --namespace=longhorn-system --timeout=10m0s --values=/home/shell/helm/values-longhorn-crd-105.1.0-up1.7.2.yaml --version=105.1.0+up1.7.2 --wait=true longhorn-crd /home/shell/helm/longhorn-crd-105.1.0-up1.7.2.tgz Release "longhorn-crd" does not exist. Installing it now. NAME: longhorn-crd LAST DEPLOYED: Tue Mar 4 00:18:14 2025 NAMESPACE: longhorn-system STATUS: deployed REVISION: 1 TEST SUITE: None --------------------------------------------------------------------- SUCCESS: helm upgrade --install=true --labels=catalog.cattle.io/cluster-repo-name=rancher-charts --namespace=longhorn-system --timeout=10m0s --values=/home/shell/helm/values-longhorn-crd-105.1.0-up1.7.2.yaml --version=105.1.0+up1.7.2 --wait=true longhorn-crd /home/shell/helm/longhorn-crd-105.1.0-up1.7.2.tgz --------------------------------------------------------------------- helm upgrade --install=true --labels=catalog.cattle.io/cluster-repo-name=rancher-charts --namespace=longhorn-system --timeout=10m0s --values=/home/shell/helm/values-longhorn-105.1.0-up1.7.2.yaml --version=105.1.0+up1.7.2 --wait=true longhorn /home/shell/helm/longhorn-105.1.0-up1.7.2.tgz Release "longhorn" does not exist. Installing it now. Error: context deadline exceeded
问题2:longhornctl预检查工具运行失败
执行longhornctl预检查时,Pod容器进入崩溃循环,错误日志如下:
> ./longhornctl check preflight INFO[2025-03-04T00:39:42Z] Initializing preflight checker INFO[2025-03-04T00:39:42Z] Cleaning up preflight checker INFO[2025-03-04T00:39:42Z] Running preflight checker ERRO[2025-03-04T00:40:09Z] Failed to run preflight checker: failed DaemonSet condition check: pod container is in crash loop. View the logs using "kubectl -n default logs longhorn-preflight-checker-gldg9 -c init-longhornctl"
注:部署Rancher时未绑定/boot/config/目录。
环境信息
Rancher: 2.10.2 Kubernetes: v1.31.1+k3s1
已知前提
已满足Longhorn部署的所有前置条件,且Rancher默认已启用Mount Propagation。
寻求解决上述安装失败及预检查工具无法运行问题的方法。
内容的提问来源于stack exchange,提问作者rrlamichhane
相关产品推荐
相关产品推荐

