cd cluster/examples/kubernetes/ceph
kubectl create -f common.yaml
kubectl create -f operator.yaml
kubectl -n rook-ceph get pod #验证rook-ceph-operator, rook-ceph-agent, and rook-discover是否在running
kubectl create -f cluster.yaml
cluster.yaml最后nodes指定节点的相关设备
useAllNodes: false
useAllDevices: false
- name: "192-168-60-14"
devices: # specific devices to use for storage can be specified for each node
- name: "sdb"
- name: "sdc"
kubectl -n rook-ceph get pod -l app=rook-ceph-osd-prepare
kubectl -n rook-ceph logs rook-ceph-osd-prepare-192-168-60-14-v7st6 provision
DISK="/dev/sdb"
sgdisk --zap-all $DISK
DISK="/dev/sdc"
sgdisk --zap-all $DISK
kubectl -n rook-ceph delete pod -l app=rook-ceph-operator
这里operator会自动起一个pod,不需要担心operator
kubectl -n rook-ceph logs rook-ceph-osd-prepare-192-168-60-14-shkf6 provision
kubectl -n rook-ceph get pod -o wide
参考