参考:https://my.oschina.net/u/2306127/blog/1830356?from=timeline
1.Rook通过一个操作器(operator)完成后续操作,只需要定义需要的状态就可以了。Rook通过操作器监控状态需求变化,并将配置文件分配到集群上生效。操作器关注包括各种集群运行和启停所需的状态信息。本文将详细讨论这些细节。
##################################################################
#operator will start and monitor ceph monitor pods and a daemonset for the OSDs (management and health)
#The Rook operator also creates the Rook agents. These agents are pods deployed on every Kubernetes node. Each agent configures a Flexvolume plugin that integrates with Kubernetes’ volume controller framework.(attch and mount operation) https://rook.github.io/docs/rook/master/
2.最简单使用方式就是“使用所有资源”模式。意味着操作者自动在所有节点上启动OSD设备,Rook会用如下标准监控并发现可用设备:
- 设备没有分区
- 设备没有格式化的文件系统
Rook不会使用不满足以上标准的设备。操作完毕后(一般要几分钟),就拥有一套OSD配置完毕的存储集群。
3.kubectl version -- Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.4",
wget https://github.com/rook/rook/archive/v0.8.0.tar.gz
tar -zxf v0.8.0.tar.gz
cd /opt/rook-0.8.0/cluster/examples/kubernetes/ceph/
kubectl apply -f operator.yaml
kubectl apply -f cluster.yaml
等待5分钟,
[root@node1 ceph]# kubectl -n rook-ceph-system get pod
NAME READY STATUS RESTARTS AGE
rook-ceph-agent-bk692 1/1 Running 0 10m
rook-ceph-agent-bx6gs 1/1 Running 0 10m
rook-ceph-agent-jpdr7 1/1 Running 0 10m
rook-ceph-operator-86776bbc44-mrc7q 1/1 Running 0 12m
rook-discover-66gkw 1/1 Running 0 10m
rook-discover-6zldc 1/1 Running 0 10m
rook-discover-dl29w 1/1 Running 0 10m
##################
rook架构图