KuberLogic是一个开源平台,它在Kubernetes集群上部署和管理软件,并将基础设施转变为托管的PaaS。它可以托管运行在本地或任何云上的数据库和流行应用程序。该解决方案提供了现成的API、监视、备份以及与SSO的集成。
特性
-
Web UI
-
自动配置
-
自动 minor 更新
-
自动故障转移
-
定期备份
-
资源使用监控
-
能够根据需要扩大和缩小规模
-
服务管理的 REST API
要求
KuberLogic 利用了很多顶尖的开源项目,它需要一个特定的环境来运行:
-
Kubernetes 集群:
-
支持 1.19,1.20,1.21,1.22 版本
-
默认配置的 StorageClass
-
loadBalance Service
-
集群中至少有 2 个节点,每个节点有 4G 内存、2 个 cpu 和 5G 硬盘空间
-
因为性能损失,Minikube 或 Kind 安装与 docker 驱动程序安装不受支持。
-
兼容 S3 存储进行数据备份(可选)
安装
-
从Releases 页面[1]下载
kuberlogic-installer命令行安装工具,并将其添加到 PATH。 -
准备 KuberLogic配置文件[2]。如下所示 config.yaml:
# cat config.yaml
---
# Target deployment platform for Kuberlogic
# Currently supported:
# * `aws` (Amazon Web Services)
# * `generic` (Any other Kubernetes installation. Default.)
platform: generic
# Whether to enable debug logs or not
debug-logs: true
# Provides an absolute path to a kubeconfig file
# default is $HOME/.kube/config
# kubeconfig-path: /path/to/kubeconfig
# namespace where Kuberlogic components will be installed
namespace: kuberlogic
# container registry connection settings. omit for public access
# registry:
# server: https://quay.io
# username: quayusername
# password: quaypassword
# connection endpoints configuration. These endpoints will be used to configure Kuberlogic endpoints
# and it is expected that Kuberlogic ingress traffic will be received via these endpoints
endpoints:
kuberlogic: kuberlogic.cn
# custom TLS certificates for UI. If not set will be generated self-signed
#kuberlogic-tls:
# ca.crt: /root/certs/rootCA.crt
# tls.crt: /root/certs/kuberlogic.crt
# tls.key: /root/certs/kuberlogic.key
monitoring-console: mc.kuberlogic.cn
# custom TLS certificates for monitoring tool. If not set will be generated self-signed
#monitoring-console-tls:
# ca.crt: /root/certs/rootCA.crt
# tls.crt: /root/certs/kuberlogic.crt
# tls.key: /root/certs/kuberlogic.key
# `auth` section contains settings for Keycloak-based authentication
auth:
# demo-user-password configures a password for Kuberlogic test user: user@kuberlogic.com
demo-user-password: secret
# admin-password is password for Keycloak realm administrator: `kuberlogic`
admin-password: adminPassword
-
运行
kuberlogic-installer install all -c <configFile>,如果 k8s 集群版本等不符合要求,则会报错。 -
运行
kuberlogic-installer status -c <configFile> -
为 KuberLogic 端点添加 DNS 记录,使它们指向 KuberLogic Ingress IP。或者,如果您正在评估 KuberLogic,您可能希望使用/etc/hosts 文件提供本地访问。
使用
Web UI
安装之后,KuberLogic 的安装过程是开箱即用的。要了解更多信息,请访问docs[3]。
REST API
KuberLogic 支持基于 rest 的服务管理 API。更多详情,请浏览:
- API 方案[4]
支持的服务
目前,KuberLogic 支持:
-
MySQL
-
PostgreSQL
即将支持的:
-
Redis
-
MongoDB
构建 KuberLogic
构建 KuberLogic 容器镜像和二进制安装程序文件。需要满足:
-
Golang 1.16
-
Helm CLI 3.x
-
Docker
创建容器镜像
make docker-build docker-push
构建安装程序
make installer-build
测试
KuberLogic 包含一组集成测试。它们可以在两种模式下运行:
-
本地模式:当 KuberLogic operator 和 ApiServer 作为 goroutines 启动时:
-
远程模式:测试发送 API 请求到远程 ApiServer。
要在两种模式下运行测试,依赖项必须安装到 Kubernetes 集群中:
kuberlogic-installer install all
# 启动Minio用于备份和恢复
cd modules/apiserver
make deploy-minio create-bucket
更多信息请参见docs[5]。
本地模式
cd modules/apiserver
make undeploy-operator generate-local-webhook-certs patch-endpoint
MY_VERSION=5.7.31 GODEBUG: x509ignoreCN=0 KUBERLOGIC_KUBECONFIGPATH=${HOME}/.kube/config make coverage-report RUN=/mysql
远程模式
cd modules/apiserver
MY_VERSION=5.7.31 GODEBUG: x509ignoreCN=0 KUBERLOGIC_KUBECONFIGPATH=${HOME}/.kube/config make remote-test REMOTE_HOST=<apiserver endpoint> RUN=/mysql
参考资料
[1]
Releases页面: github.com/kuberlogic/…
[2]
配置文件: github.com/kuberlogic/…
[3]
docs: docs.kuberlogic.com/quick-start…
[4]
API方案: editor.swagger.io/?url=https:…
[5]
docs: github.com/kuberlogic/…
后台回复“加群”,带你进入高手如云交流群
欢迎小伙伴们投稿原创文章~
投稿格式:markdown格式的md文件
投稿邮箱: pub@kubeinfo.cn
推荐阅读
关注公众号【我的小碗汤】本公众号主要分享linux、Golang、网络、云原生相关技术,实用工具