|NO.Z.00242|——————————|^^ 部署 ^^|——|KuberNetes&儲存進階.V08|-------------------------------------------------------|Ceph.v02|ceph叢集|部署|
阿新 • • 發佈:2022-03-31
[CloudNative:KuberNetes&儲存進階.V08] [Applications.KuberNetes] [|DevOps|k8s|雲原生儲存及儲存進階|**5節點.上**|Rook安裝1.5.11安裝ceph叢集|]
一、部署ceph
### --- 建立crds、common、operator [root@k8s-master01 ceph]# kubectl create -f crds.yaml -f common.yaml -f operator.yaml customresourcedefinition.apiextensions.k8s.io/cephclusters.ceph.rook.io created customresourcedefinition.apiextensions.k8s.io/cephclients.ceph.rook.io created customresourcedefinition.apiextensions.k8s.io/cephrbdmirrors.ceph.rook.io created customresourcedefinition.apiextensions.k8s.io/cephfilesystems.ceph.rook.io created customresourcedefinition.apiextensions.k8s.io/cephnfses.ceph.rook.io created customresourcedefinition.apiextensions.k8s.io/cephobjectstores.ceph.rook.io created customresourcedefinition.apiextensions.k8s.io/cephobjectstoreusers.ceph.rook.io created customresourcedefinition.apiextensions.k8s.io/cephobjectrealms.ceph.rook.io created customresourcedefinition.apiextensions.k8s.io/cephobjectzonegroups.ceph.rook.io created customresourcedefinition.apiextensions.k8s.io/cephobjectzones.ceph.rook.io created customresourcedefinition.apiextensions.k8s.io/cephblockpools.ceph.rook.io created customresourcedefinition.apiextensions.k8s.io/volumes.rook.io created customresourcedefinition.apiextensions.k8s.io/objectbuckets.objectbucket.io created customresourcedefinition.apiextensions.k8s.io/objectbucketclaims.objectbucket.io created namespace/rook-ceph created clusterrolebinding.rbac.authorization.k8s.io/rook-ceph-object-bucket created serviceaccount/rook-ceph-admission-controller created clusterrole.rbac.authorization.k8s.io/rook-ceph-admission-controller-role created clusterrolebinding.rbac.authorization.k8s.io/rook-ceph-admission-controller-rolebinding created clusterrole.rbac.authorization.k8s.io/rook-ceph-cluster-mgmt created role.rbac.authorization.k8s.io/rook-ceph-system created clusterrole.rbac.authorization.k8s.io/rook-ceph-global created clusterrole.rbac.authorization.k8s.io/rook-ceph-mgr-cluster created clusterrole.rbac.authorization.k8s.io/rook-ceph-object-bucket created serviceaccount/rook-ceph-system created rolebinding.rbac.authorization.k8s.io/rook-ceph-system created clusterrolebinding.rbac.authorization.k8s.io/rook-ceph-global created serviceaccount/rook-ceph-osd created serviceaccount/rook-ceph-mgr created serviceaccount/rook-ceph-cmd-reporter created role.rbac.authorization.k8s.io/rook-ceph-osd created clusterrole.rbac.authorization.k8s.io/rook-ceph-osd created clusterrole.rbac.authorization.k8s.io/rook-ceph-mgr-system created role.rbac.authorization.k8s.io/rook-ceph-mgr created role.rbac.authorization.k8s.io/rook-ceph-cmd-reporter created rolebinding.rbac.authorization.k8s.io/rook-ceph-cluster-mgmt created rolebinding.rbac.authorization.k8s.io/rook-ceph-osd created rolebinding.rbac.authorization.k8s.io/rook-ceph-mgr created rolebinding.rbac.authorization.k8s.io/rook-ceph-mgr-system created clusterrolebinding.rbac.authorization.k8s.io/rook-ceph-mgr-cluster created clusterrolebinding.rbac.authorization.k8s.io/rook-ceph-osd created rolebinding.rbac.authorization.k8s.io/rook-ceph-cmd-reporter created podsecuritypolicy.policy/00-rook-privileged created clusterrole.rbac.authorization.k8s.io/psp:rook created clusterrolebinding.rbac.authorization.k8s.io/rook-ceph-system-psp created rolebinding.rbac.authorization.k8s.io/rook-ceph-default-psp created rolebinding.rbac.authorization.k8s.io/rook-ceph-osd-psp created rolebinding.rbac.authorization.k8s.io/rook-ceph-mgr-psp created rolebinding.rbac.authorization.k8s.io/rook-ceph-cmd-reporter-psp created serviceaccount/rook-csi-cephfs-plugin-sa created serviceaccount/rook-csi-cephfs-provisioner-sa created role.rbac.authorization.k8s.io/cephfs-external-provisioner-cfg created rolebinding.rbac.authorization.k8s.io/cephfs-csi-provisioner-role-cfg created clusterrole.rbac.authorization.k8s.io/cephfs-csi-nodeplugin created clusterrole.rbac.authorization.k8s.io/cephfs-external-provisioner-runner created clusterrolebinding.rbac.authorization.k8s.io/rook-csi-cephfs-plugin-sa-psp created clusterrolebinding.rbac.authorization.k8s.io/rook-csi-cephfs-provisioner-sa-psp created clusterrolebinding.rbac.authorization.k8s.io/cephfs-csi-nodeplugin created clusterrolebinding.rbac.authorization.k8s.io/cephfs-csi-provisioner-role created serviceaccount/rook-csi-rbd-plugin-sa created serviceaccount/rook-csi-rbd-provisioner-sa created role.rbac.authorization.k8s.io/rbd-external-provisioner-cfg created rolebinding.rbac.authorization.k8s.io/rbd-csi-provisioner-role-cfg created clusterrole.rbac.authorization.k8s.io/rbd-csi-nodeplugin created clusterrole.rbac.authorization.k8s.io/rbd-external-provisioner-runner created clusterrolebinding.rbac.authorization.k8s.io/rook-csi-rbd-plugin-sa-psp created clusterrolebinding.rbac.authorization.k8s.io/rook-csi-rbd-provisioner-sa-psp created clusterrolebinding.rbac.authorization.k8s.io/rbd-csi-nodeplugin created clusterrolebinding.rbac.authorization.k8s.io/rbd-csi-provisioner-role created configmap/rook-ceph-operator-config created deployment.apps/rook-ceph-operator created
二、建立cluster.yaml### --- 檢視建立的operator ~~~ 檢視operator啟動之後再去執行cluster.yaml ~~~ 等operator完全啟動之後再部署cluster ~~~ 等operator完全啟動之後再部署cluster [root@k8s-master01 ceph]# kubectl get po -n rook-ceph -owide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES rook-ceph-operator-d7fcf5b94-zwkmj 1/1 Running 0 37m 172.25.244.237 k8s-master01 <none> <none> rook-discover-jd7gl 1/1 Running 0 30m 172.17.125.13 k8s-node01 <none> <none> rook-discover-n5swg 1/1 Running 0 30m 172.25.92.115 k8s-master02 <none> <none> rook-discover-njbzn 1/1 Running 0 30m 172.25.244.238 k8s-master01 <none> <none> rook-discover-xjfvb 1/1 Running 0 30m 172.18.195.37 k8s-master03 <none> <none>/
### --- 建立cluster.yaml
[root@k8s-master01 ceph]# kubectl create -f cluster.yaml -n rook-ceph
cephcluster.ceph.rook.io/rook-ceph created
### --- 檢視所有容器啟動成功說明ceph叢集部署OK ~~~ 注意:需要注意的是,osd-x的容器必須是存在的,且是正常的。 ~~~ 如果上述Pod均正常,則認為叢集安裝成功。 [root@k8s-master01 ceph]# kubectl get po -n rook-ceph NAME READY STATUS RESTARTS AGE csi-cephfsplugin-4b8mw 3/3 Running 0 110m csi-cephfsplugin-85dds 3/3 Running 0 110m csi-cephfsplugin-nvxl6 3/3 Running 0 110m csi-cephfsplugin-provisioner-76d45764d-8jwk8 6/6 Running 39 110m csi-cephfsplugin-provisioner-76d45764d-rcf92 6/6 Running 56 110m csi-cephfsplugin-zgnj4 3/3 Running 0 110m csi-rbdplugin-krkrh 3/3 Running 0 110m csi-rbdplugin-mkthw 3/3 Running 0 110m csi-rbdplugin-pnhc7 3/3 Running 0 110m csi-rbdplugin-provisioner-84f7bb7b87-bvhqs 6/6 Running 56 110m csi-rbdplugin-provisioner-84f7bb7b87-jxkqg 6/6 Running 34 110m csi-rbdplugin-znp77 3/3 Running 0 110m rook-ceph-crashcollector-k8s-master01-7555856cb9-x7l4j 1/1 Running 0 115m rook-ceph-crashcollector-k8s-master02-95ffb6b88-mq74k 1/1 Running 0 115m rook-ceph-crashcollector-k8s-master03-5c8fcc5fd9-8vz8p 1/1 Running 0 110m rook-ceph-crashcollector-k8s-node01-7d98687665-bdfhs 1/1 Running 0 110m rook-ceph-mgr-a-84c77cf657-hnlm2 1/1 Running 7 115m rook-ceph-mon-a-84bbcf774d-cj9lp 1/1 Running 19 115m rook-ceph-operator-d7fcf5b94-zwkmj 1/1 Running 0 155m rook-ceph-osd-0-5f86775f9d-lzxnp 0/1 Running 26 110m rook-ceph-osd-1-5c9f7b7b9b-pbps5 1/1 Running 17 87m rook-ceph-osd-2-b4cc5b766-m48hc 1/1 Running 19 110m rook-ceph-osd-prepare-k8s-master02-8zb5x 0/1 Completed 0 3m24s rook-ceph-osd-prepare-k8s-master03-jr24t 0/1 Completed 0 3m21s rook-ceph-osd-prepare-k8s-node01-b29g6 0/1 Completed 0 3m18s rook-discover-jd7gl 1/1 Running 0 148m rook-discover-n5swg 1/1 Running 0 148m rook-discover-njbzn 1/1 Running 0 148m rook-discover-xjfvb 1/1 Running 0 148m
===============================END===============================
Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart ——W.S.Landor
來自為知筆記(Wiz)