milvus-logo

Configure Meta Storage with Milvus Operator

Milvus uses etcd for storing metadata. This topic introduces how to configure meta storage dependency when you install Milvus with Milvus Operator.

This topic assumes that you have deployed Milvus Operator.

See Deploy Milvus Operator for more information.

You need to specify a configuration file for using Milvus Operator to start a Milvus cluster.

kubectl apply -f https://raw.githubusercontent.com/milvus-io/milvus-operator/main/config/samples/milvuscluster_default.yaml

You only need to edit the code template in milvuscluster_default.yaml to configure third-party dependencies. The following sections introduce how to configure object storage, etcd, and Pulsar respectively.

Configure etcd

Add required fields under spec.dependencies.etcd to configure etcd.

etcd supports external and inCluster.

Fields used to configure an external etcd service include:

  • external: A true value indicates that Milvus uses an external etcd service.
  • endpoints: The endpoints of etcd.

External etcd

Example

The following example configures an external etcd service.

kind: MilvusCluster

metadata:

  name: my-release

  labels:

    app: milvus


spec:

  dependencies: # Optional

    etcd: # Optional

      # Whether (=true) to use an existed external etcd as specified in the field endpoints or 

      # (=false) create a new etcd inside the same kubernetes cluster for milvus.

      external: true # Optional default=false

      # The external etcd endpoints if external=true

      endpoints:

      - 192.168.1.1:2379

  components: {}

  config: {}

Internal etcd

inCluster indicates when a Milvus cluster starts, an etcd service starts automatically in the cluster.

Example

The following example configures an internal etcd service.

apiVersion: milvus.io/v1alpha1

kind: MilvusCluster

metadata:

  name: my-release

  labels:

    app: milvus

spec:

  dependencies:

    etcd:

      inCluster:

        values:

          replicaCount: 5

          resources:

            limits: 

              cpu: '4'

              memory: 8Gi

            requests:

              cpu: 200m

              memory: 512Mi

  components: {}

  config: {}              
The preceding example specifies the number of replicas as 5 and limits the compute resources for etcd.
Find the complete configuration items to configure an internal etcd service in values.yaml. Add configuration items as needed under etcd.inCluster.values as shown in the preceding example.

Assuming that the configuration file is named milvuscluster.yaml, run the following command to apply the configuration.

kubectl apply -f milvuscluster.yaml

What's next

Learn how to configure other Milvus dependencies with Milvus Operator:

On this page