叢集元件
Percona Operator for MongoDB
執行 MongoDB 資料庫並備份到 S3,採 SSPL 授權。
- 閒置時的記憶體
- 約 20 MiB
- CI 在應用程式就緒、還沒有流量時量到的。實際使用會更多,記得留點空間。
- 測試過的伺服器
- x86 和 ARM
- 預設是否安裝
- 選用
簡介
Percona Operator for MongoDB 依 PerconaServerMongoDB 物件執行 MongoDB 複本集,並用 Percona Backup for MongoDB 排程備份到 S3。專案需要 MongoDB 時就裝它。
Operator 採 Apache-2.0 授權。它執行的 Percona Server for MongoDB 映像檔採 SSPL-1.0,這不是 OSI 認可的開源授權。使用前請先閱讀 SSPL。
Operator 會替每個 Namespace 的 MongoDB 叢集管理 Pod、Service、Secret 和 PVC。這個元件關閉了 Operator 的遙測(預設會回報給 Percona)。
使用方式
在 Zeabur 開源版打開專案的新增選單,選 MongoDB。設定版本和儲存空間,再接到服務,並在資料庫的備份分頁設定 S3 備份。詳見建立、備份與還原資料庫。
需要它的範本
移除
移除 Operator 後,CRD 會留著。只要還有 PerconaServerMongoDB 物件,Zeabur 開源版就拒絕移除,所以先刪除不要的資料庫,其餘的先備份。已刪除資料庫的 PVC 會留著。確定不再需要資料時,自己刪除。詳見移除元件。
疑難排解
資料庫一直沒有就緒
用 kubectl -n <namespace> get psmdb <name> 查看物件,再用 kubectl -n <namespace> get pods 查看它的 Pod。Operator 的日誌用 kubectl -n psmdb-operator logs deploy/psmdb-operator 查看。
MongoDB 8 的 Pod 一啟動就當掉
MongoDB 8 無法在 Linux 6.19 以上啟動(SERVER-121912)。用 uname -r 查看節點的核心版本。Zeabur 開源版建立的 MongoDB 8 資料庫都會加上 GLIBC_TUNABLES=glibc.pthread.rseq=1。自己建立的資料庫請改用 7.0 映像檔。
技術細節
這個版本
- 提供的功能
- databases
- 授權
- Apache-2.0 AND SSPL-1.0
- 官方網站
- docs.percona.com
CI 測試結果
CI 會把這些檔案原封不動裝到新的叢集,等到它就緒,再記下閒置時的記憶體用量。
| 發行版 | 平台 | Kubernetes | 通過日期 | 閒置記憶體 |
|---|---|---|---|---|
| k3s | linux/amd64 | v1.37.2 | 22 MiB | |
| k3s | linux/arm64 | v1.37.2 | 21 MiB | |
| kind | linux/amd64 | v1.37.0 | 18 MiB | |
| kind | linux/arm64 | v1.37.0 | 19 MiB | |
| kubesolo | linux/amd64 | v1.36.6 | 18 MiB | |
| kubesolo | linux/arm64 | v1.36.6 | 18 MiB | |
| rke2 | linux/amd64 | v1.37.2 | 23 MiB | |
| rke2 | linux/arm64 | v1.37.2 | 23 MiB |
安全性
Manages pods, Services, Secrets and PVCs for MongoDB clusters in every namespace.
會安裝的內容
- psmdb-operator 1.23.2