參考: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架構圖