<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.linuxsa.org/index.php?action=history&amp;feed=atom&amp;title=Rook%E5%AE%89%E8%A3%85</id>
	<title>Rook安装 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.linuxsa.org/index.php?action=history&amp;feed=atom&amp;title=Rook%E5%AE%89%E8%A3%85"/>
	<link rel="alternate" type="text/html" href="https://wiki.linuxsa.org/index.php?title=Rook%E5%AE%89%E8%A3%85&amp;action=history"/>
	<updated>2026-04-17T09:15:40Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://wiki.linuxsa.org/index.php?title=Rook%E5%AE%89%E8%A3%85&amp;diff=945&amp;oldid=prev</id>
		<title>Evan：​/* ins and config */</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxsa.org/index.php?title=Rook%E5%AE%89%E8%A3%85&amp;diff=945&amp;oldid=prev"/>
		<updated>2023-10-09T10:34:19Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;ins and config&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=info=&lt;br /&gt;
Kubernetes:  v1.24.10&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Raw devices (no partitions or formatted filesystems)&lt;br /&gt;
This requires lvm2 to be installed on the host. To avoid this dependency, you can create a single full-disk partition on the disk (see below)&lt;br /&gt;
Raw partitions (no formatted filesystem)&lt;br /&gt;
Persistent Volumes available from a storage class in block mode&lt;br /&gt;
&lt;br /&gt;
个人建议有三个工作节点或者更加多&lt;br /&gt;
&lt;br /&gt;
首先为三个节点添加三个未格式化的硬盘 ，我用的是proxmox  直接在ui添加 也行 选择每个节点vm &lt;br /&gt;
Hard Disk-- add  我这里每个添加30G &lt;br /&gt;
&lt;br /&gt;
root@ubuntu-200430-2:~# lsblk  -f &lt;br /&gt;
NAME    FSTYPE         LABEL           UUID                                 FSAVAIL FSUSE% MOUNTPOINT&lt;br /&gt;
loop0   squashfs                                                                  0   100% /snap/core20/2015&lt;br /&gt;
loop1   squashfs                                                                  0   100% /snap/lxd/24061&lt;br /&gt;
loop2   squashfs                                                                  0   100% /snap/snapd/20092&lt;br /&gt;
sda                                                                                        &lt;br /&gt;
├─sda1  ext4           cloudimg-rootfs 6482e2e0-f3de-4156-bc4b-49b189543d07   12.1G    55% /&lt;br /&gt;
├─sda14                                                                                    &lt;br /&gt;
└─sda15 vfat           UEFI            AD2F-0F3A                              98.3M     6% /boot/efi&lt;br /&gt;
sdb     #这一行空  安装后 为 下面的样子&lt;br /&gt;
&lt;br /&gt;
sdb     ceph_bluestore 安装后                                                                    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=ins and config=&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --single-branch --branch v1.6.3 https://github.com/rook/rook.git&lt;br /&gt;
#天朝你懂的 所以官司的很多东西拉不来的&lt;br /&gt;
cd rook/cluster/examples/kubernetes/ceph&lt;br /&gt;
&lt;br /&gt;
修改Rook CSI镜像地址，原本的地址可能是gcr的镜像，但是gcr的镜像无法被国内访问，所以需要同步gcr的镜像到阿里云镜像仓库，本文档已经为大家完成同步，可以直接修改如下：&lt;br /&gt;
&lt;br /&gt;
vim operator.yaml&lt;br /&gt;
改为：&lt;br /&gt;
&lt;br /&gt;
 ROOK_CSI_REGISTRAR_IMAGE: &amp;quot;registry.cn-beijing.aliyuncs.com/dotbalo/csi-node-driver-registrar:v2.0.1&amp;quot;&lt;br /&gt;
 ROOK_CSI_RESIZER_IMAGE: &amp;quot;registry.cn-beijing.aliyuncs.com/dotbalo/csi-resizer:v1.0.1&amp;quot;&lt;br /&gt;
 ROOK_CSI_PROVISIONER_IMAGE: &amp;quot;registry.cn-beijing.aliyuncs.com/dotbalo/csi-provisioner:v2.0.4&amp;quot;&lt;br /&gt;
 ROOK_CSI_SNAPSHOTTER_IMAGE: &amp;quot;registry.cn-beijing.aliyuncs.com/dotbalo/csi-snapshotter:v4.0.0&amp;quot;&lt;br /&gt;
 ROOK_CSI_ATTACHER_IMAGE: &amp;quot;registry.cn-beijing.aliyuncs.com/dotbalo/csi-attacher:v3.0.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
还是operator文件，新版本rook默认关闭了自动发现容器的部署，可以找到ROOK_ENABLE_DISCOVERY_DAEMON改成true即可：&lt;br /&gt;
&lt;br /&gt;
##Deploy the Rook Operator   下面的可以参考官方了&lt;br /&gt;
cd cluster/examples/kubernetes/ceph&lt;br /&gt;
kubectl create -f crds.yaml -f common.yaml -f operator.yaml&lt;br /&gt;
&lt;br /&gt;
# verify the rook-ceph-operator is in the `Running` state before proceeding&lt;br /&gt;
kubectl -n rook-ceph get pod&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
创建ceph集群&lt;br /&gt;
&lt;br /&gt;
kubectl create -f cluster.yaml&lt;br /&gt;
&lt;br /&gt;
#过程慢慢等&lt;br /&gt;
root@k8smater:~/rook# kubectl -n rook-ceph get pod&lt;br /&gt;
NAME                                              READY   STATUS      RESTARTS   AGE&lt;br /&gt;
csi-cephfsplugin-6nwx9                            3/3     Running     0          126m&lt;br /&gt;
csi-cephfsplugin-kn56d                            3/3     Running     0          126m&lt;br /&gt;
csi-cephfsplugin-provisioner-77c7f8f674-9kcn8     6/6     Running     0          126m&lt;br /&gt;
csi-cephfsplugin-provisioner-77c7f8f674-vjlp5     6/6     Running     0          126m&lt;br /&gt;
csi-cephfsplugin-xgsrj                            3/3     Running     0          126m&lt;br /&gt;
csi-rbdplugin-mxbrx                               3/3     Running     0          126m&lt;br /&gt;
csi-rbdplugin-p9z5m                               3/3     Running     0          126m&lt;br /&gt;
csi-rbdplugin-provisioner-5b78cf5f59-f66cf        6/6     Running     0          126m&lt;br /&gt;
csi-rbdplugin-provisioner-5b78cf5f59-t6tjh        6/6     Running     0          126m&lt;br /&gt;
csi-rbdplugin-pvkzs                               3/3     Running     0          126m&lt;br /&gt;
rook-ceph-crashcollector-work1-77c4b4995-ww7qn    1/1     Running     0          108m&lt;br /&gt;
rook-ceph-crashcollector-work2-85fb65c68d-qkgwx   1/1     Running     0          123m&lt;br /&gt;
rook-ceph-crashcollector-work3-555d56d445-9lkr4   1/1     Running     0          123m&lt;br /&gt;
rook-ceph-mds-myfs-a-6c9fc8cff5-z66fv             1/1     Running     0          108m&lt;br /&gt;
rook-ceph-mds-myfs-b-54f94bbd77-h5jnk             1/1     Running     0          108m&lt;br /&gt;
rook-ceph-mgr-a-784bb444f8-m48lw                  1/1     Running     0          123m&lt;br /&gt;
rook-ceph-mon-a-5699bddbbf-t9g59                  1/1     Running     0          123m&lt;br /&gt;
rook-ceph-mon-b-5874d4cc7c-pc8f6                  1/1     Running     0          123m&lt;br /&gt;
rook-ceph-mon-c-6c479888cd-rr57r                  1/1     Running     0          123m&lt;br /&gt;
rook-ceph-operator-76948f86f7-s69j5               1/1     Running     0          140m&lt;br /&gt;
rook-ceph-osd-0-5fd689dc96-ng6c6                  1/1     Running     0          123m&lt;br /&gt;
rook-ceph-osd-1-7bcfcf7656-gcrn2                  1/1     Running     0          123m&lt;br /&gt;
rook-ceph-osd-prepare-work1-wvvx4                 0/1     Completed   0          122m&lt;br /&gt;
rook-ceph-osd-prepare-work2-9pcxl                 0/1     Completed   0          122m&lt;br /&gt;
rook-ceph-osd-prepare-work3-wsd8m                 0/1     Completed   0          122m&lt;br /&gt;
rook-ceph-tools-897d6797f-k9tcs                   1/1     Running     0          118m&lt;br /&gt;
rook-discover-4q7tw                               1/1     Running     0          137m&lt;br /&gt;
rook-discover-hrtrl                               1/1     Running     0          137m&lt;br /&gt;
rook-discover-nzw6l                               1/1     Running     0          137m&lt;br /&gt;
root@k8smater:~/rook# &lt;br /&gt;
&lt;br /&gt;
To verify that the cluster is in a healthy state, connect to the Rook toolbox and run the ceph status command.&lt;br /&gt;
&lt;br /&gt;
All mons should be in quorum&lt;br /&gt;
A mgr should be active&lt;br /&gt;
At least one OSD should be active&lt;br /&gt;
If the health is not HEALTH_OK, the warnings or errors should be investigated&lt;br /&gt;
&lt;br /&gt;
安装ceph 客户端工具&lt;br /&gt;
&lt;br /&gt;
这个文件的路径还是在ceph文件夹下&lt;br /&gt;
&lt;br /&gt;
kubectl  create -f toolbox.yaml -n rook-ceph&lt;br /&gt;
&lt;br /&gt;
待容器Running后，即可执行相关命令：&lt;br /&gt;
&lt;br /&gt;
[root@k8s-master]# kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- bash&lt;br /&gt;
[root@rook-ceph-tools-fc5f9586c-m2wf5 /]# ceph status&lt;br /&gt;
  cluster:&lt;br /&gt;
    id:     9016340d-7f90-4634-9877-aadc927c4e81&lt;br /&gt;
    health: HEALTH_WARN&lt;br /&gt;
            mons are allowing insecure global_id reclaim&lt;br /&gt;
            clock skew detected on mon.b&lt;br /&gt;
&lt;br /&gt;
  services:&lt;br /&gt;
    mon: 3 daemons, quorum a,b,c (age 3m)&lt;br /&gt;
    mgr: a(active, since 44m)&lt;br /&gt;
    osd: 3 osds: 3 up (since 38m), 3 in (since 38m)&lt;br /&gt;
&lt;br /&gt;
  data:&lt;br /&gt;
    pools:   1 pools, 1 pgs&lt;br /&gt;
    objects: 0 objects, 0 B&lt;br /&gt;
    usage:   3.0 GiB used, 57 GiB / 60 GiB avail&lt;br /&gt;
    pgs:     1 active+clean&lt;br /&gt;
&lt;br /&gt;
配置ceph dashboard&lt;br /&gt;
&lt;br /&gt;
默认的ceph 已经安装的ceph-dashboard，但是其svc地址为service clusterIP，并不能被外部访问&lt;br /&gt;
&lt;br /&gt;
kubectl apply -f dashboard-external-https.yaml&lt;br /&gt;
&lt;br /&gt;
创建NodePort类型就可以被外部访问了&lt;br /&gt;
&lt;br /&gt;
 root@k8smater:~/rook/rook/cluster/examples/kubernetes/ceph# kubectl get svc -n rook-ceph|grep dashboard&lt;br /&gt;
rook-ceph-mgr-dashboard                  ClusterIP   10.233.209.181   &amp;lt;none&amp;gt;        8443/TCP            7m50s&lt;br /&gt;
rook-ceph-mgr-dashboard-external-https   NodePort    10.233.72.80     &amp;lt;none&amp;gt;        8443:30491/TCP      18s&lt;br /&gt;
&lt;br /&gt;
浏览器访问(master01-ip换成自己的集群ip)：&lt;br /&gt;
&lt;br /&gt;
https://master01-ip:32529/#/login?returnUrl=%2Fdashboard&lt;br /&gt;
&lt;br /&gt;
https://192.168.10.31:30491/#/login?returnUrl=%2Fdashboard&lt;br /&gt;
&lt;br /&gt;
用户名默认是admin，至于密码可以通过以下代码获取：&lt;br /&gt;
&lt;br /&gt;
kubectl -n rook-ceph get secret rook-ceph-dashboard-password -o jsonpath=&amp;quot;{[&amp;#039;data&amp;#039;][&amp;#039;password&amp;#039;]}&amp;quot;|base64 --decode &amp;amp;&amp;amp; echo&lt;br /&gt;
iS_cB+NB&amp;gt;|g^&amp;quot;$b&amp;amp;dv:xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=references=&lt;br /&gt;
&lt;br /&gt;
https://rook.io/docs/rook/v1.6/ceph-quickstart.html&lt;br /&gt;
&lt;br /&gt;
https://zhuanlan.zhihu.com/p/387531212&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://developer.aliyun.com/article/873291&lt;br /&gt;
&lt;br /&gt;
https://www.cnblogs.com/mgsudu/p/16162617.html&lt;br /&gt;
&lt;br /&gt;
https://juejin.cn/post/7079046477577715742&lt;br /&gt;
&lt;br /&gt;
https://www.cnblogs.com/deny/p/14229987.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[category:k8s]] [[category:devops]]&lt;/div&gt;</summary>
		<author><name>Evan</name></author>
	</entry>
</feed>