前面是以在宿主主機上,建立虛擬主機並進行 kubernetes 及 ceph 的群集安裝部署。
在實機上進行部署,差異只有在實機硬體設定、作業系統安裝、網路設定部分。
在本地端完成實機部署後,透過監控平台看到群集運作情形:
透過 kubectl 指令,查看所建立的 pv 及 pvc 範例:
$ kubectl get pvc --all-namespaces
NAMESPACE NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
app-collabora cold Bound app-collabora-cold 1000Gi RWX 84d
app-collabora normal Bound app-collabora-normal 100Gi RWX 84d
app-drone cold Bound app-drone-cold 1000Gi RWX 69d
app-drone normal Bound app-drone-normal 100Gi RWX 69d
app-gitea cold Bound app-gitea-cold 1000Gi RWX 90d
app-gitea normal Bound app-gitea-normal 100Gi RWX 90d
app-hackmd cold Bound app-hackmd-cold 1000Gi RWX 90d
app-hackmd normal Bound app-hackmd-normal 100Gi RWX 90d
app-nextcloud cold Bound app-nextcloud-cold 1000Gi RWX 90d
app-nextcloud normal Bound app-nextcloud-normal 100Gi RWX 90d
app-odoo cold Bound app-odoo-cold 1000Gi RWX 7h6m
app-odoo normal Bound app-odoo-normal 100Gi RWX
$ kubectl get pv --all-namespaces
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
app-collabora-cold 1000Gi RWX Retain Bound app-collabora/cold 84d
app-collabora-normal 100Gi RWX Retain Bound app-collabora/normal 84d
app-drone-cold 1000Gi RWX Retain Bound app-drone/cold 69d
app-drone-normal 100Gi RWX Retain Bound app-drone/normal 69d
app-gitea-cold 1000Gi RWX Retain Bound app-gitea/cold 90d
app-gitea-normal 100Gi RWX Retain Bound app-gitea/normal 90d
app-hackmd-cold 1000Gi RWX Retain Bound app-hackmd/cold 90d
app-hackmd-normal 100Gi RWX Retain Bound app-hackmd/normal 90d
app-nextcloud-cold 1000Gi RWX Retain Bound app-nextcloud/cold 90d
app-nextcloud-normal 100Gi RWX Retain Bound app-nextcloud/normal 90d
app-odoo-cold 1000Gi RWX Retain Bound app-odoo/cold 7h6m
app-odoo-normal 100Gi RWX Retain Bound app-odoo/normal 7h6m
其中某個 pv 的內容,提供 app-odoo 的 normal pvc 使用,儲存類型為 CephFS,服務提供及連線:
$ kubectl describe pv app-odoo-normal
Name: app-odoo-normal
Labels: <none>
Annotations: <none>
Finalizers: [kubernetes.io/pv-protection]
StorageClass:
Status: Bound
Claim: app-odoo/normal
Reclaim Policy: Retain
Access Modes: RWX
VolumeMode: Filesystem
Capacity: 100Gi
Node Affinity: <none>
Message:
Source:
Type: CephFS (a CephFS mount on the host that shares a pod's lifetime)
Monitors: [192.168.1.101:6789]
Path: /kube-store/app-odoo/data
User: admin
SecretFile:
SecretRef: &SecretReference{Name:ceph-secret,Namespace:,}
ReadOnly: false
Events: <none>