基础设施即代码(IAC),Zalando Postgres Operator UI 入门

发布时间:2022-06-24 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了基础设施即代码(IAC),Zalando Postgres Operator UI 入门脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

基础设施即代码(IAC),Zalando Postgres Operator UI 入门

Postgres Operator UI 提供了一个图形界面,方便用户体验数据库即服务。一旦 database 和/或 Kubernetes (K8s) 管理员设置了 operator,其他团队就很容易创建、克隆、监视、编辑和删除自己的 Postgres 集群。有关设置和技术细节的信息可以在 admin 文档中找到。

  • admin 文档: https://postgres-operator.readthedocs.io/en/latest/administrator/#setting-up-the-postgres-operator-ui

创建一个新集群

在顶部菜单中选择 New cluster 选项并调整文本字段中的值。 集群名称由团队给定名称组成。 可用选项包括启用负载均衡器卷大小用户和数据库以及 pod 资源

  • 启用负载均衡器: https://postgres-operator.readthedocs.io/en/latest/administrator/#load-balancers-and-allowed-ip-ranges
  • 卷大小:https://postgres-operator.readthedocs.io/en/latest/user/#increase-volume-size
  • 用户和数据库:https://postgres-operator.readthedocs.io/en/latest/user/#manifest-roles
  • pod 资源:https://postgres-operator.readthedocs.io/en/latest/operator-ui/cluster-manifest.md#postgres-container-resources

基础设施即代码(IAC),Zalando Postgres Operator UI 入门

在左侧,您将看到 Postgres 集群清单的预览,当单击绿色的 Create cluster 按钮时应用该清单。

集群启动

清单应用于 K8s 后,Postgres Operator 将创建所有必要的资源。 在 UI status 页面中可以很好地跟踪此过程的进度。

基础设施即代码(IAC),Zalando Postgres Operator UI 入门

基础设施即代码(IAC),Zalando Postgres Operator UI 入门

通常,启动最多只需要 1 分钟。如果您觉得流程卡住了,请单击 Logs 按钮检查 operator 日志。如果日志看起来没问题,但 UI 似乎卡住了,请检查您是否配置了与 operator 相同的集群名称标签。

  • operator:https://github.com/zalando/postgres-operator/blob/master/manifests/configmap.yaml#L13
  • 集群名称标签:https://github.com/zalando/postgres-operator/blob/master/ui/manifests/deployment.yaml#L45

从顶部菜单的 Status 字段中,您还可以检索 operator 正在使用的每个 worker 的日志和队列。可以配置并发 worker 的数量。

  • 配置:https://postgres-operator.readthedocs.io/en/latest/reference/operator_parameters/#general

基础设施即代码(IAC),Zalando Postgres Operator UI 入门

启动完成后,您将看到集群地址路径。启用负载均衡器后,列出的路径可用作连接 PostgreSQL 时的主机名。但是,请确保您的 IP 在指定的 allowedSourceRanges 范围内。

基础设施即代码(IAC),Zalando Postgres Operator UI 入门

更新和删除集群

创建的集群列在 PostgreSQL clusters 菜单下。您可以通过 Status 按钮返回集群的 status 页面。从这两个菜单中,您可以选择编辑清单、克隆或删除集群。

  • 克隆:https://postgres-operator.readthedocs.io/en/latest/user/#how-to-clone-an-existing-postgresql-cluster

基础设施即代码(IAC),Zalando Postgres Operator UI 入门

请注意,UI 中尚不支持所有清单选项。 如果您尝试将它们添加到编辑器视图中,则不会产生效果。请改用 kubectl 命令。 左侧显示的清单也将显示以这种方式修补的参数。

  • 清单选项:https://postgres-operator.readthedocs.io/en/latest/reference/cluster_manifest/

删除集群时,系统会要求您输入其命名空间名称以确认操作。

基础设施即代码(IAC),Zalando Postgres Operator UI 入门

更多

  • 基础设施即代码(IAC),Zalando Postgres Operator 简介
  • Zalando Postgres Operator 快速上手

脚本宝典总结

以上是脚本宝典为你收集整理的基础设施即代码(IAC),Zalando Postgres Operator UI 入门全部内容,希望文章能够帮你解决基础设施即代码(IAC),Zalando Postgres Operator UI 入门所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。