-
登陆到
ceph
集群的monitor
节点,为kubernetes
创建pool
和client auth
(现假设pool name为kube)ceph osd pool create kube 8 8 ceph auth add client.kube mon 'allow r' osd 'allow rwx pool=kube'
-
获取
ceph
集群admin
和新建 poolkube
的auth key
ceph auth get-key client.admin | base64 (记录回显值为admin_key,后续步骤需要用) ceph auth get-key client.kube | base64 (记录回显值为pool_key,后续步骤需要用)
-
登陆到部署节点,编辑
/etc/kubez/globals.yml
enable_rbd_provisioner: "yes" pool_name: kube monitors: monitor_ip:port (port默认为6789) admin_key: admin_key pool_key: pool_key
-
执行如下命令完成
external ceph
集成.# multinode kubez-ansible -i multinode apply # all-in-one kubez-ansible apply
-
部署完验证
kubectl apply -f examples/test-rbd.yaml kubectl get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE test-rbd Bound pvc-487cf629-24e8-4889-a977-dc8ac6c48d22 1Gi RWO rbd 25m rbd ls kube kubernetes-dynamic-pvc-d4a56035-4a94-11ea-aa72-d23b78a708e0