使用 Helm 安装 Quickwit
Helm 是一个 Kubernetes 包管理器,允许您以版本控制和可重现的方式在 Kubernetes 集群中配置、安装和升级容器化应用程序。
您可以使用官方的 Quickwit Helm 图表在 Kubernetes 上安装 Quickwit。如果在使用图表时遇到任何问题,请在我 们的 GitHub 仓库 中提交问题。
要求
要在 Kubernetes 上部署 Quickwit,您需要:
kubectl
,与您的集群兼容(与集群相差不超过一个次版本)(kubectl version
)- Helm v3 (
helm version
) - 一个 Kubernetes 集群
- 安装
kubectl
和helm
要本地安装 kubectl
和 helm
,请遵循 Kubernetes 和 Helm 的文档页面。
- 将 Quickwit Helm 图表仓库添加到 Helm
helm repo add quickwit https://helm.quickwit.io
- 更新仓库
helm repo update quickwit
- 创建并定制您的配置文件
values.yaml
您可以使用以下命令检查 chart 的默认配置值:
helm show values quickwit/quickwit
这里是一个使用文件支持的元存储的最小配置示例:
environment:
QW_METASTORE_URI: s3://<my-bucket>/quickwit-indexes
config:
default_index_root_uri: s3://<my-bucket>/quickwit-indexes
storage:
s3:
region: eu-east-1
# We recommend using IAM roles and permissions to access Amazon S3 resources,
# but you can specify a pair of access and secret keys if necessary.
access_key_id: <my access key>
secret_access_key: <my secret key>
- 部署 Quickwit
helm install <deployment name> quickwit/quickwit -f values.yaml
- 检查 Quickwit 是否正在运行
启动集群可能需要一些时间。在启动过程中,各个 Pod 可能会重启多次。上一步的命令将打印连接到集群的指令。这个端点可用于访问 Quickwit 搜索 UI,并执行标准 API 命令。
使用 PostgreSQL 作为元数据存储
文件支持的元存储主要用于测试目的。尽管文件支持的元存储更容易设置,但我们强烈建议在生产环境中使用 PostgreSQL 作为元存储。要让 Quickwit 使用 PostgreSQL 作为元数据存储,您需要提供 PostgreSQL 连接信息而不是元存储 URI。
config:
default_index_root_uri: s3://<my-bucket>/quickwit-indexes
postgres:
host: <postgres_host>
port: 5432
database: quickwit-metastore
username: quickwit
password: <my strong password> # This password will be stored as a Kubernetes Secret
storage: {}
s3:
region: eu-east-1
# We recommend using IAM roles and permissions to access Amazon S3 resources,
# but you can specify a pair of access and secret keys if necessary.
access_key_id: <my access key>
secret_access_key: <my secret key>
卸载部署
运行以下 Helm 命令来卸载部署:
helm uninstall <deployment name>