Rancher 安装 Longhorn 报错解决办法

一、Rancher 安装 Longhorn

至于 Longhorn 的概念这里就不赘述了,主要记录安装 Longhorn 的时候longhorn-driver-deployerlonghorn-manager无法成功启动问题。

在应用商店搜索Longhorn

image-20220222110610953

其他的保持默认,点击启动即可

image-20220222110716492

二、报错解决方法

查看longhorn-manager其中一个 Pod 日志如下:

2022/02/22 02:45:53 proto: duplicate proto type registered: VersionResponse 
time="2022-02-22T02:45:53Z" level=error msg="Failed environment check, please make sure you have iscsiadm/open-iscsi installed on the host" 
time="2022-02-22T02:45:53Z" level=fatal msg="Error starting manager: Environment check failed: Failed to execute: nsenter [--mount=/host/proc/1/ns/mnt --net=/host/proc/1/ns/net iscsiadm --version], output , stderr, nsenter: failed to execute iscsiadm: No such file or directory\n, error exit status 127" 

Snipaste_2022-02-22_10-56-54

通过日志报错得知缺少iscsiadm命令,根据你的系统安装该命令即可,查询到的相关资料如下:

https://github.com/longhorn/longhorn/issues/1493

https://longhorn.io/docs/0.8.0/install/requirements/

image-20220222111946811

我的系统是 CentOS,每个节点都需要安装:

[root@k8s-master01 ~]# yum install iscsi-initiator-utils

安装好之后,选择不能成功启动的 Pod 重新部署一下即可。

image-20220222112618218

posted @ 2022-02-22 11:31  神奇二进制  阅读(1815)  评论(0编辑  收藏  举报