milvus-logo

Configure Meta Storage with Docker Compose or Helm

Milvus uses etcd for storing metadata. This topic introduces how to configure etcd with Docker Compose or Helm.

Configure etcd with Docker Compose

1. Configure etcd

To configure etcd with Docker Compose, provide your values for the etcd section in the milvus.yaml file on the milvus/configs path.

etcd:
  endpoints:
    - localhost:2379
  rootPath: by-dev # The root path where data are stored in etcd
  metaSubPath: meta # metaRootPath = rootPath + '/' + metaSubPath
  kvSubPath: kv # kvRootPath = rootPath + '/' + kvSubPath
  log:
    # path is one of:
    #  - "default" as os.Stderr,
    #  - "stderr" as os.Stderr,
    #  - "stdout" as os.Stdout,
    #  - file path to append server logs to.
    # please adjust in embedded Milvus: /tmp/milvus/logs/etcd.log
    path: stdout
    level: info # Only supports debug, info, warn, error, panic, or fatal. Default 'info'.
  use:
    # please adjust in embedded Milvus: true
    embed: false # Whether to enable embedded Etcd (an in-process EtcdServer).
  data:
    # Embedded Etcd only.
    # please adjust in embedded Milvus: /tmp/milvus/etcdData/
    dir: default.etcd

See etcd-related Configurations for more information.

2. Run Milvus

Run the following command to start Milvus that uses the etcd configurations.

docker-compose up
Configurations only take effect after Milvus starts. See Start Milvus for more information.

Configure etcd on K8s

For Milvus clusters on K8s, you can configure etcd in the same command that starts Milvus. Alternatively, you can configure etcd using the values.yml file on the /charts/milvus path in the milvus-helm repository before you start Milvus.

The following table lists the keys for configuring etcd in the YAML file.

Key Description Value
externaletcd.enabled Enables or disables S3. true/false
externalS3.endpoints The endpoint to access S3.

Using the YAML file

  1. Configure the externaletcd section using your values in the values.yaml file.
externalEtcd:
  enabled: true
  ## the endpoints of the external etcd
  endpoints:
    - localhost:2379
  1. After configuring the preceding sections and saving the values.yaml file, run the following command to install Milvus that uses the etcd configurations.
helm install <your_release_name> milvus/milvus -f values.yaml

Using a command

To install Milvus and configure etcd, run the following command using your values.

helm install <your_release_name> milvus/milvus --set cluster.enabled=true --set externaletcd.enabled=true 

What's next

Learn how to configure other Milvus dependencies with Docker Compose or Helm:

On this page