专属
文档
插件
助手
邀请
顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像

交易
充值流量我的订单

文档

工具

功能
提交工单页面收录

帮助
轩辕镜像免费版

其他
关于我们网站地图
热门搜索:
cloudnative-pg

bitnamicharts/cloudnative-pg

bitnamicharts

Bitnami提供的Helm chart,用于在Kubernetes上部署和管理CloudNativePG。

下载次数: 0状态:社区镜像维护者:bitnamicharts仓库类型:镜像最近更新:10 个月前
让 AI 帮你使用轩辕镜像? · 展开查看说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

轩辕镜像,加速的不只是镜像。点击查看
中文简介
标签下载
镜像标签列表与下载命令
轩辕镜像,加速的不只是镜像。点击查看

Bitnami CloudNativePG 软件包

CloudNativePG 是一款开源工具,用于在 Kubernetes 上管理 PostgreSQL 数据库,涵盖从设置到日常维护的全流程。

CloudNativePG 概述

商标说明:本软件列表由 Bitnami 打包。所提及的相关商标归各自公司所有,使用这些商标并不意味着任何关联或背书。

TL;DR(快速入门)

console
helm install my-release oci://registry-1.docker.io/bitnamicharts/cloudnative-pg

如需在生产环境中使用 CloudNativePG?请尝试 VMware Tanzu Application Catalog,即 Bitnami 目录的商业版。

⚠️ 重要通知:Bitnami 目录即将变更

自 2025 年 8 月 28 日起,Bitnami 将升级其公共目录,通过新的 Bitnami Secure Images 计划 提供精选的强化、安全聚焦型镜像。作为此次转型的一部分:

  • 首次向社区用户开放热门容器镜像的安全优化版本。
  • Bitnami 将开始在免费层级中弃用对非强化、基于 Debian 的软件镜像的支持,并逐步从公共目录中移除非最新标签。因此,社区用户将只能访问数量减少的强化镜像。这些镜像仅以“latest”标签发布,仅供开发使用。
  • 自 8 月 28 日起,在两周内,所有现有容器镜像(包括旧版或版本化标签,如 2.50.0、10.6)将从公共目录(docker.io/bitnami)迁移至“Bitnami Legacy”仓库(docker.io/bitnamilegacy),且不再接收更新。
  • 对于生产工作负载和长期支持,建议用户采用 Bitnami Secure Images,包括强化容器、更小的***面、CVE 透明度(通过 VEX/KEV)、SBOM 以及企业支持。

这些变更旨在通过推广软件供应链完整性和最新部署的最佳实践,提升所有 Bitnami 用户的安全态势。更多详情,请访问 https://github.com/bitnami/containers/issues/83267%E3%80%82

简介

本图表使用 Helm 包管理器在 Kubernetes 集群上引导部署 https://github.com/bitnami/containers/tree/main/bitnami/cloudnative-pg%E3%80%82

前提条件

  • Kubernetes 1.23+
  • Helm 3.8.0+

安装图表

要安装发布名称为 my-release 的图表:

console
helm install my-release REGISTRY_NAME/REPOSITORY_NAME/cloudnative-pg

注意:需将占位符 REGISTRY_NAME 和 REPOSITORY_NAME 替换为 Helm 图表仓库和仓库的引用。例如,对于 Bitnami,需使用 REGISTRY_NAME=registry-1.docker.io 和 REPOSITORY_NAME=bitnamicharts。

该命令使用默认配置在 Kubernetes 集群上部署 CloudNativePG。参数 部分列出了安装过程中可配置的参数。

提示:使用 helm list 列出所有发布。

配置和安装详情

操作器配置

Bitnami CloudNativePG 图表允许使用 ConfigMaps 和 Secrets 配置操作器。通过 operator.configuration 和 operator.secretConfiguration 参数进行配置。两者兼容,且 operator.secretConfiguration 部分的配置优先级高于 operator.configuration。以下示例为操作器添加额外配置参数:

yaml
operator:
  configuration:
    EXPIRING_CHECK_THRESHOLD: 12
  secretConfiguration:
    CERTIFICATE_DURATION: 120

也可使用现有 ConfigMaps 和 Secrets,通过 operator.existingConfigMap 和 operator.existingSecret 参数(注意:这些参数与 operator.configuration 和 operator.secretConfiguration 参数不兼容)。

资源请求和限制

Bitnami 图表允许为图表部署内的所有容器设置资源请求和限制。这些配置位于 operator 和 pluginBarmanCloud 部分下的 *.resources 值中(参见参数表)。设置请求对于生产工作负载至关重要,应根据具体用例调整。

为简化此过程,图表包含 operator 和 pluginBarmanCloud 部分下的 *.resourcesPreset 值,可根据不同预设自动设置 *.resources 部分。有关这些预设的详细信息,请参见 https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15%E3%80%82%E4%BD%86%E5%9C%A8%E7%94%9F%E4%BA%A7%E5%B7%A5%E4%BD%9C%E8%B4%9F%E8%BD%BD%E4%B8%AD%EF%BC%8C%E4%B8%8D%E5%BB%BA%E8%AE%AE%E4%BD%BF%E7%94%A8 resourcesPreset,因为它可能无法完全适应具体需求。有关容器资源管理的更多信息,请参见 Kubernetes 官方文档。

备份和恢复

Bitnami CloudNativePG 图表包含 plugin-barman-cloud,用于执行备份操作。通过设置 pluginBarmanCloud.enabled=true 启用:

yaml
pluginBarmanCloud:
  enabled: true

有关如何部署 BarmanObjectStore 对象和启用备份操作,请参见上游 plugin-barman-cloud 文档。

Prometheus 指标

通过将 operator 和 pluginBarmanCloud 部分下的 *.metrics.enabled 设置为 true,可将此图表与 Prometheus 集成。这将在 metrics 服务中公开 cloudnative-pg 原生 Prometheus 端点,可在 operator 和 pluginBarmanCloud 部分下的 *.metrics.service 部分进行配置。它将包含必要的注解,以便被 Prometheus 自动抓取。

对于 PostgreSQL 实例本身,图表部署带有基本查询的监控查询 ConfigMap 或 Secret。这些可在 operator.metrics.monitoringQueries 部分配置。

Prometheus 要求

需安装 Prometheus 或 Prometheus Operator 才能使集成工作。安装 https://github.com/bitnami/charts/tree/main/bitnami/prometheus 或 https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus%EF%BC%8C%E5%8F%AF%E8%BD%BB%E6%9D%BE%E5%9C%A8%E9%9B%86%E7%BE%A4%E4%B8%AD%E9%83%A8%E7%BD%B2 Prometheus。

与 Prometheus Operator 集成

通过将 operator 和 pluginBarmanCloud 部分下的 *.metrics.serviceMonitor.enabled=true 设置为 true,图表可部署 ServiceMonitor 对象以与 Prometheus Operator 集成。确保集群中已安装 Prometheus Operator CustomResourceDefinitions,否则将失败并显示以下错误:

text
no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"

安装 https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus 以获取必要的 CRD 和 Prometheus Operator。

滚动标签与不可变标签

强烈建议在生产环境中使用不可变标签。这可确保如果相同标签更新为不同镜像,部署不会自动更改。

如果主容器有新版本、重大变更或严重漏洞,Bitnami 将发布新图表以更新其容器。

额外环境变量

如需添加额外环境变量(用于高级操作,如自定义初始化脚本),可使用 operator 和 pluginBarmanCloud 部分下的 extraEnvVars 属性:

yaml
operator:
  extraEnvVars:
    - name: LOG_LEVEL
      value: error

或者,可使用包含环境变量的 ConfigMap 或 Secret。为此,使用 operator 和 pluginBarmanCloud 部分下的 extraEnvVarsCM 或 extraEnvVarsSecret 值。

边车容器

如果需要在 cloudnative-pg 所在的同一 Pod 中添加额外容器(如额外指标或日志导出器),可在 operator 和 pluginBarmanCloud 部分下使用 sidecars 参数定义:

yaml
operator:
  sidecars:
  - name: your-image-name
    image: your-image
    imagePullPolicy: Always
    ports:
    - name: portname
      containerPort: 1234

如果这些边车容器导出额外端口,可使用 *.service.extraPorts 参数(如可用)添加额外端口定义,如下例所示:

yaml
operator:
  service:
    extraPorts:
    - name: extraPort
      port: 11311
      targetPort: 11311

如需在同一 Pod 中添加额外初始化容器,可在 operator 和 pluginBarmanCloud 部分下使用 initContainers 参数定义。示例如下:

yaml
initContainers:
  - name: your-image-name
    image: your-image
    imagePullPolicy: Always
    ports:
      - name: portname
        containerPort: 1234

了解更多关于 边车容器 和 初始化容器 的信息。

部署额外资源

除操作器外,可能还需要部署 PostgreSQL Cluster、ImageCatalog 或其他操作器对象。为此,图表允许使用 extraDeploy 参数添加其他对象的完整规范。以下示例创建一个 PostgreSQL Cluster 对象和包含角色凭据的 Secret:

yaml
extraDeploy:
- apiVersion: v1
  kind: Secret
  metadata:
    name: my-cluster-example-user
    labels:
      cnpg.io/reload: "true"
  type: kubernetes.io/basic-auth
  stringData:
    username: my_user
    password: bitnami1234
- apiVersion: postgresql.cnpg.io/v1
  kind: Cluster
  metadata:
    name: my-cluster-example
  spec:
    instances: 3
    storage:
      size: 1Gi
    managed:
      roles:
        - name: my_user
          ensure: present
          comment: MY User
          login: true
          superuser: true
          passwordSecret:
            name: my-cluster-example-user

有关可用对象的列表,请参见 CloudNativePG 官方文档。

Pod 亲和性

此图表允许在 operator 和 pluginBarmanCloud 部分下使用 affinity 参数设置自定义亲和性。有关 Pod 亲和性的更多信息,请参见 Kubernetes 文档。

作为替代方案,可使用 https://github.com/bitnami/charts/tree/main/bitnami/common#affinities 图表中提供的 Pod 亲和性、Pod 反亲和性和节点亲和性预设配置。为此,在 operator 和 pluginBarmanCloud 部分下设置 podAffinityPreset、podAntiAffinityPreset 或 nodeAffinityPreset 参数。

参数

全局参数

名称描述值
global.imageRegistry全局 Docker 镜像仓库""
global.imagePullSecrets全局 Docker 仓库密钥名称数组[]
global.defaultStorageClass持久卷的全局默认存储类""
global.security.allowInsecureImages允许跳过镜像验证false
global.compatibility.openshift.adaptSecurityContext调整部署的 securityContext 部分以使其与 OpenShift restricted-v2 SCC 兼容:移除 runAsUser、runAsGroup 和 fsGroup,让平台使用其允许的默认 ID。可能值:auto(如果检测到运行的集群是 OpenShift,则应用)、force(始终执行调整)、disabled(不执行调整)auto

通用参数

名称描述值
kubeVersion覆盖 Kubernetes 版本""
apiVersions覆盖 .Capabilities 报告的 Kubernetes API 版本[]
nameOverride部分覆盖 common.names.name 的字符串""
fullnameOverride完全覆盖 common.names.fullname 的字符串""
namespaceOverride完全覆盖 common.names.namespace 的字符串""
commonLabels添加到所有部署对象的标签{}
commonAnnotations添加到所有部署对象的注解{}
clusterDomainKubernetes 集群域名cluster.local
extraDeploy随发布部署的额外对象数组[]

cloudnative-pg 操作器参数

名称描述值
operator.image.registrycloudnative-pg 操作器镜像仓库REGISTRY_NAME
operator.image.repositorycloudnative-pg 操作器镜像仓库路径REPOSITORY_NAME/cloudnative-pg
operator.image.digestcloudnative-pg 操作器镜像摘要,格式为 sha256:aa.... 注意:如果设置此参数,将覆盖镜像标签(建议使用不可变标签)""
operator.image.pullPolicycloudnative-pg 操作器镜像拉取策略IfNotPresent
operator.image.pullSecretscloudnative-pg 操作器镜像拉取密钥[]
operator.image.debug启用 cloudnative-pg 操作器镜像调试模式false
operator.postgresqlImage.registryPostgreSQL 镜像仓库REGISTRY_NAME
operator.postgresqlImage.repositoryPostgreSQL 镜像仓库路径REPOSITORY_NAME/postgresql
operator.postgresqlImage.digestPostgreSQL 镜像摘要,格式为 sha256:aa.... 注意:如果设置此参数,将覆盖标签""
operator.replicaCountcloudnative-pg 操作器部署的副本数1
operator.containerPorts.metricscloudnative-pg 操作器指标容器端口8080
operator.containerPorts.webhookcloudnative-pg 操作器 Webhook 容器端口9443
operator.livenessProbe.enabled启用 cloudnative-pg 操作器容器的存活探针true
operator.livenessProbe.initialDelaySeconds存活探针初始延迟秒数5
operator.livenessProbe.periodSeconds存活探针周期秒数10
operator.livenessProbe.timeoutSeconds存活探针超时秒数5
operator.livenessProbe.failureThreshold存活探针失败阈值5
operator.livenessProbe.successThreshold存活探针成功阈值1
operator.readinessProbe.enabled启用 cloudnative-pg 操作器容器的就绪探针true
operator.readinessProbe.initialDelaySeconds就绪探针初始延迟秒数5
operator.readinessProbe.periodSeconds就绪探针周期秒数10
operator.readinessProbe.timeoutSeconds就绪探针超时秒数5
operator.readinessProbe.failureThreshold就绪探针失败阈值5
operator.readinessProbe.successThreshold就绪探针成功阈值1
operator.startupProbe.enabled启用 cloudnative-pg 操作器容器的启动探针false

注意:此图表的 README 超出了 DockerHub 25000 字符的长度限制,因此已被截断。完整 README 可参见 https://github.com/bitnami/charts/blob/main/bitnami/cloudnative-pg/README.md

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 cloudnative-pg 镜像标签

docker pull docker.xuanyuan.run/bitnamicharts/cloudnative-pg:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull bitnamicharts/cloudnative-pg:<标签>

更多 cloudnative-pg 镜像推荐

cleanstart/cloudnative-pg logo

cleanstart/cloudnative-pg

cleanstart
CloudNativePG 是一个 Kubernetes operator,用于在 Kubernetes 集群上管理 PostgreSQL 工作负载,提供高可用性、可扩展性和自动化管理功能,基于 CleanStart 安全加固的最小化基础 OS,适用于云原生环境。
1万+ 次下载
23 天前更新
bitnami/cloudnative-pg logo

bitnami/cloudnative-pg

Bitnami Secure Images(VMware Tanzu)
Bitnami安全镜像,适用于cloudnative-pg的部署与运行,提供安全加固的云原生PostgreSQL环境支持。
9.4千+ 次下载
10 个月前更新
bitnamilegacy/cloudnative-pg logo

bitnamilegacy/cloudnative-pg

bitnamilegacy
Bitnami旧版镜像(不再更新),包含所有现有容器镜像的备份,仅用于临时迁移,无进一步更新或支持,未来可能被移除。
3.5千+ 次下载
9 个月前更新
giantswarm/cloudnative-pg logo

giantswarm/cloudnative-pg

giantswarm
暂无描述
1.1千+ 次下载
7 个月前更新

查看更多 cloudnative-pg 相关镜像

轩辕镜像配置手册

按平台快速找到配置文档

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

iKuai 镜像加速

宝塔面板

一键配置镜像源

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

一键安装

一键安装 Docker

Linux Docker 一键安装

需要其他帮助?请查看我们的 常见问题 Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

免费版与专业版区别

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

错误码

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 请求频率

其他报错

DNS 超时

DNS 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

账号

失败是否计费

manifest · blob · 计费

申请开发票(企业 / 个人)

企业 · 个人 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
bitnamicharts/cloudnative-pg
教程轩辕镜像功能与使用教程
价格查看流量套餐与价格
热门查看热门 Docker 镜像推荐
博客Docker 镜像公告与技术博客
官方公众号:源码跳动|官方技术交流群:51517718
官方公众号:源码跳动|官方技术交流群:|问题咨询请:提交工单
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.