git clone https://github.com/rook/rook.git
cd rook/cluster/examples/kubernetes/ceph/
kubectl apply -f operator.yaml
kubectl apply -f cluster.yaml
kubectl apply -f dashboard-external-http.yaml
kubectl get service -n rook-ceph | grep dashboard
kubectl -n rook-ceph logs $(kubectl get pod -n rook-ceph | grep mgr | awk '{print $1}') | grep password
kubectl apply -f storageclass.yaml
md5-61cc1db19fccd8841ed6b947538103c7
# 标记默认storageclass
kubectl patch storageclass rook-ceph-block -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
md5-61cc1db19fccd8841ed6b947538103c7
kubectl apply -f toolbox.yaml
tools=`kubectl -n rook-ceph get pods -o wide | grep ceph-tools|awk '{print $1}'`
kubectl -n rook-ceph exec -it $tools bash
rbd info -p replicapool pvc-5bfbe28e-0fc9-11e9-b90d-000c291c25f3
# 重置web密码
ceph dashboard set-login-credentials admin admin