官网的步骤
git clone --single-branch --branch v1.12.9 https://github.com/rook/rook.git
cd rook/deploy/examples
kubectl create -f crds.yaml -f common.yaml -f operator.yaml
kubectl create -f cluster.yaml
整理后的已经替换好的国内镜像的
git clone https://gitee.com/jbjb123/rook-ceph.git
cd rook-ceph/rook-ceph-1.12.9/
kubectl create -f crds.yaml -f common.yaml -f operator.yaml
kubectl create -f cluster.yaml
如果安装遇到csi-rbdplugin报错以下信息
rbd_util.go:303] modprobe failed (an error (exit status 1) occurred while running modprobe args: [rbd]): "modprobe: ERROR: could not insert 'rbd': Exec format error\n"
16529 driver.go:154] an error (exit status 1) occurred while running modprobe args: [rbd]
需要在node节点上重新加载内核
#我的内核比较高opensuse tumbleweed
# ls /lib/modules/6.5.6-1-default/kernel/drivers/block/rbd.ko.zst
/lib/modules/6.5.6-1-default/kernel/drivers/block/rbd.ko.zst
重新加载
# modprobe rbd
重启恢复正常
csi-rbdplugin-2l6zk 2/2 Running 0 3h3m
csi-rbdplugin-5lfrd 2/2 Running 0 3h3m
csi-rbdplugin-j96zs 2/2 Running 0 3h3m
最后创建dashboard,tools,storageclass
kubectl apply -f dashboard-https.yaml -f toolbox.yaml -f nginx.yaml
#获取dashboard登录密码
kubectl -n rook-ceph get secret rook-ceph-dashboard-password -o jsonpath="{['data']['password']}"|base64 --decode && echo