叢集元件
VictoriaMetrics operator
執行指標與日誌的儲存服務。
- 閒置時的記憶體
- 約 20 MiB
- CI 在應用程式就緒、還沒有流量時量到的。實際使用會更多,記得留點空間。
- 測試過的伺服器
- x86 和 ARM
- 預設是否安裝
- 一台機器選用,多台機器建議安裝
簡介
VictoriaMetrics operator 依照 VMSingle、VLSingle 這類自訂資源,建立並管理指標和日誌的儲存服務。它也讀得懂 Prometheus operator 的物件,所以現有的應用程式資訊清單照樣能用。
不用單獨安裝。VictoriaMetrics 和 VictoriaLogs 需要這個 operator,Zeabur 開源版會先裝好。operator 需要 cert-manager(或其他提供 certificates 的元件),來簽發 admission webhook 的憑證。
operator 管理每個 Namespace 的物件,能讀取所有 Secret、在任何 Namespace 建立 Pod,也能建立 ClusterRole 和綁定,所以權杖等於 cluster-admin。
使用方式
operator 沒有 Zeabur 開源版畫面。安裝 VictoriaMetrics 或 VictoriaLogs 之後 operator 才開始工作。確認 operator 在執行,並列出它管理的物件:
kubectl -n observability get deploy victoria-metrics-operator
kubectl get vmsingle,vlsingle -A
要自己寫抓取目標、警示規則這類物件,詳見 operator 文件。
移除
移除前,清理 Job 會刪除所有 Namespace 裡的 VictoriaMetrics 和 VictoriaLogs 物件,包含儲存服務、代理程式、警示規則、抓取物件、探測,以及存成 VMAlertmanagerConfig 的通知管道。請先移除 VictoriaMetrics 和 VictoriaLogs,想沿用的規則或管道先自己備份。
CRD 會留著,清理 hook 的 ClusterRole 和 ClusterRoleBinding 也會留著。其他已安裝的元件還需要它時,Zeabur 開源版會拒絕移除。詳見移除元件。
疑難排解
建立 VictoriaMetrics 物件時出現 webhook 錯誤
admission webhook 需要憑證。確認憑證已就緒,operator 的 Pod 也在執行:
kubectl -n observability get certificate victoria-metrics-operator-validation
kubectl -n observability get pods
技術細節
這個版本
- 提供的功能
- observability-operator
- 授權
- Apache-2.0
CI 測試結果
CI 會把這些檔案原封不動裝到新的叢集,等到它就緒,再記下閒置時的記憶體用量。
| 發行版 | 平台 | Kubernetes | 通過日期 | 閒置記憶體 |
|---|---|---|---|---|
| k3s | linux/amd64 | v1.37.2 | 19 MiB | |
| k3s | linux/arm64 | v1.37.2 | 19 MiB | |
| kind | linux/amd64 | v1.37.0 | 20 MiB | |
| kind | linux/arm64 | v1.37.0 | 20 MiB | |
| kubesolo | linux/amd64 | v1.36.6 | 21 MiB | |
| kubesolo | linux/arm64 | v1.36.6 | 21 MiB | |
| rke2 | linux/amd64 | v1.37.2 | 20 MiB | |
| rke2 | linux/arm64 | v1.37.2 | 20 MiB |
安全性
Manages VictoriaMetrics and VictoriaLogs objects and their workloads in all namespaces. It can read every Secret, create pods in any namespace, and create ClusterRoles and bindings, so its token equals cluster-admin.
會安裝的內容
- operator 0.68.1
需要
- 任一個提供 certificates 的元件