配置 Helm(configure-helm)

本主题介绍如何使用Helm Charts配置Milvus组件及其第三方依赖项。

在当前版本中,所有参数只有在Milvus重新启动后才会生效。

通过配置文件配置Milvus

您可以使用配置文件values.yaml配置Milvus。

下载配置文件

下载 (opens in a new tab) values.yaml 文件,或者使用以下命令下载。

$ wget https://raw.githubusercontent.com/milvus-io/milvus-helm/master/charts/milvus/values.yaml
 

修改配置文件

通过在values.yaml中调整相应参数,可以将Milvus实例配置为适合您的应用程序场景。

具体来说,在values.yaml中搜索extraConfigFiles,并将配置放在该节中,如下所示:

# Extra configs for milvus.yaml
# If set, this config will merge into milvus.yaml
# Please follow the config structure in the milvus.yaml
# at https://github.com/milvus-io/milvus/blob/master/configs/milvus.yaml
# Note: this config will be the top priority which will override the config
# in the image and helm chart.
extraConfigFiles:
  user.yaml: |+
    #    For example to set the graceful time for query nodes
    #    queryNodes:
    #      gracefulTime: 10
 

Check the following links for more information about each parameter.

Sorted by:

Components or dependencies Configuration purposes

依赖项组件
* etcd * MinIO or S3 * Pulsar * RocksMQ* Root coord * Proxy * Query coord * Query node * Index coord * Index node * Data coord * Data node * Local storage * Log * Message channel * Common * Knowhere * Quota and Limits
目的 Purpose参数 Parameters
Performance tuning* queryNode.gracefulTime * rootCoord.minSegmentSizeToEnableIndex * dataCoord.segment.maxSize * dataCoord.segment.sealProportion * dataNode.flush.insertBufSize * queryCoord.autoHandoff * queryCoord.autoBalance * localStorage.enabled
Data and meta* common.retentionDuration * rocksmq.retentionTimeInMinutes * dataCoord.enableCompaction * dataCoord.enableGarbageCollection * dataCoord.gc.dropTolerance
Administration* log.level * log.file.rootPath * log.file.maxAge * minio.accessKeyID * minio.secretAccessKey
Quota and Limits* quotaAndLimits.ddl.enabled * quotaAndLimits.ddl.collectionRate * quotaAndLimits.ddl.partitionRate * quotaAndLimits.indexRate.enabled * quotaAndLimits.indexRate.max * quotaAndLimits.flushRate.enabled * quotaAndLimits.flush.max * quotaAndLimits.compation.enabled * quotaAndLimits.compaction.max * quotaAndLimits.dml.enabled * quotaAndLimits.dml.insertRate.max * quotaAndLimits.dml.deleteRate.max * quotaAndLimits.dql.enabled * quotaAndLimits.dql.searchRate.max * quotaAndLimits.dql.queryRate.max * quotaAndLimits.limitWriting.ttProtection.enabled * quotaAndLimits.limitWriting.ttProtection.maxTimeTickDelay * quotaAndLimits.limitWriting.memProtection.enabled * quotaAndLimits.limitWriting.memProtection.dataNodeMemoryLowWaterLevel * quotaAndLimits.limitWriting.memProtection.queryNodeMemoryLowWaterLevel * quotaAndLimits.limitWriting.memProtection.dataNodeMemoryHighWaterLevel * quotaAndLimits.limitWriting.memProtection.queryNodeMemoryHighWaterLevel * quotaAndLimits.limitWriting.diskProtection.enabled * quotaAndLimits.limitWriting.diskProtection.diskQuota * [quotaAndLimits.limitWriting.forceDeny](configure_quota_limits

对于 Kubernetes 安装的其他参数,请参见Milvus Helm Chart 配置 (opens in a new tab)

启动 Milvus

完成修改配置文件后,您可以使用该文件启动Milvus。

$ helm upgrade my-release milvus/milvus -f values.yaml
 

通过命令行配置Milvus

或者,您可以直接使用Helm命令升级Milvus配置。

检查可配置参数

在升级之前,您可以使用Helm图表检查可配置参数。

$ helm show values milvus/milvus
 

启动Milvus

通过在升级命令中添加--values--set,对Milvus进行配置和启动。

# 例如,禁用紧缩功能的Milvus集群升级
$ helm upgrade my-release milvus/milvus --set dataCoord.enableCompaction=false
 

下一步