
Redpanda Operator 是 Redpanda 官方提供的 Kubernetes Operator,用于在 Kubernetes 集群中自动化管理 Redpanda 集群的全生命周期。该 Operator 基于 https://github.com/kubernetes-sigs/kubebuilder 框架构建,通过 Kubernetes CustomResourceDefinition (CRD) 提供声明式 API,简化 Redpanda 集群的部署、配置、扩展和维护流程。
4.1.1 通过 Helm 部署(推荐)
bash# 添加 Redpanda Helm 仓库 helm repo add redpanda https://charts.redpanda.com helm repo update # 安装 Operator(指定命名空间) helm install redpanda-operator redpanda/redpanda-operator \ --namespace redpanda-operator \ --create-namespace
4.1.2 通过 kubectl 手动部署
bash# 应用 CRD kubectl apply -f https://raw.githubusercontent.com/redpanda-data/redpanda-operator/main/config/crd/bases/redpanda.vectorized.io_redpandas.yaml # 部署 Operator 控制器 kubectl apply -f https://raw.githubusercontent.com/redpanda-data/redpanda-operator/main/config/manager/manager.yaml -n redpanda-operator
创建 Redpanda 自定义资源(CR)定义集群配置,示例 redpanda-cluster.yaml:
yamlapiVersion: redpanda.vectorized.io/v1alpha1 kind: Redpanda metadata: name: redpanda-cluster namespace: redpanda spec: clusterSpec: replicas: 3 # 3节点集群 resources: requests: cpu: 2 memory: 4Gi limits: cpu: 4 memory: 8Gi storage: persistentVolumeClaim: spec: accessModes: ["ReadWriteOnce"] resources: requests: storage: 100Gi # 每个节点100Gi存储 configuration: kafkaApi: - port: 9092 # Kafka API端口 adminApi: - port: 9644 # 管理API端口
应用 CR 创建集群:
bashkubectl apply -f redpanda-cluster.yaml -n redpanda
Redpanda CR 的主要配置参数如下(详细参数见 官方文档):
| 参数路径 | 描述 | 默认值 |
|---|---|---|
spec.clusterSpec.replicas | 集群副本数(broker节点数量) | 1 |
spec.clusterSpec.resources | CPU/内存资源请求与限制 | 无 |
spec.clusterSpec.storage | 存储配置(支持PVC) | 无 |
spec.clusterSpec.image | Redpanda 镜像版本 | 最新稳定版 |
spec.clusterSpec.configuration | 服务配置(API端口、TLS、日志等) | 内置默认配置 |
部署 Operator 时可通过环境变量调整行为,常用变量:
| 环境变量名 | 描述 | 默认值 |
|---|---|---|
WATCH_NAMESPACE | 监控命名空间(为空则监控所有命名空间) | 部署所在命名空间 |
LOG_LEVEL | 日志级别(debug/info/warn/error) | info |
OPERATOR_NAME | Operator 标识名称 | redpanda-operator |
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。


探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务