admin管理员组文章数量:1410717
I installed Rancher
as outlined in their github Quick Start:
sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher
I then went ahead and tried to install Longhorn
, however I'm unable to install it and keep getting this error.
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
I cannot run the longhorn CLI checker that longhorn has either since the instructions does not bind the /boot/config/
to the docker container so I keep getting this error:
> ./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"
I have already satisfied all the requirements mentioned in Longhorn prerequisites, please note that it says Rancher already has Mount Propagation enabled by default.
Versions:
Rancher: 2.10.2
Kubernetes: v1.31.1+k3s1
I installed Rancher
as outlined in their github Quick Start:
sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher
I then went ahead and tried to install Longhorn
, however I'm unable to install it and keep getting this error.
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
I cannot run the longhorn CLI checker that longhorn has either since the instructions does not bind the /boot/config/
to the docker container so I keep getting this error:
> ./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"
I have already satisfied all the requirements mentioned in Longhorn prerequisites, please note that it says Rancher already has Mount Propagation enabled by default.
Versions:
Rancher: 2.10.2
Kubernetes: v1.31.1+k3s1
Share
Improve this question
asked Mar 4 at 0:45
rrlamichhanerrlamichhane
1,7052 gold badges22 silver badges39 bronze badges
1
- check in which namespace you want to install longhorn. – MikiBelavista Commented Mar 4 at 5:55
2 Answers
Reset to default 0Try
helm repo add longhorn https://charts.longhorn.io
helm repo update
then
kubectl create namespace longhorn-system
helm install longhorn longhorn/longhorn --namespace longhorn-system
Verify
kubectl -n longhorn-system get pod
This is kind of embarrassing but apparently I failed to read the documentation properly. The issue was that rancher
is for testing/development purposes only in docker
container mode. Once I installed a local k3s
cluster and added rancher
on top of that, I was able to install longhorn
easily as specified in the docs.
- Install
k3s
- https://docs.k3s.io/quick-start#install-script
- Install
rancher
- https://ranchermanager.docs.rancher/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster
- Install
longhorn
(make sure you have met the pre-requisites)- https://longhorn.io/docs/1.8.0/deploy/install/install-with-rancher/
Here's the note on docker
installation:
- https://ranchermanager.docs.rancher/getting-started/installation-and-upgrade/other-installation-methods
The Docker installation is for development and testing environments only.
本文标签: kubernetesCannot install Longhorn in Rancher running using DockerStack Overflow
版权声明:本文标题:kubernetes - Cannot install Longhorn in Rancher running using Docker - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745066026a2640527.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论