|Index|SUSE AI Factory Applications|Milvus

3 Milvus

Milvus (https://milvus.io) is an open source, cloud-native vector database designed to store, index and manage massive datasets of high-dimensional vector embeddings. It accelerates similarity search by separating storage and computing, allowing independent scaling of both layers. This architecture enables low-latency retrieval across billions of vectors for large-scale artificial intelligence (AI) applications, making it highly effective for retrieval-augmented generation (RAG) and semantic search.

3.1 How do I get the values list for Milvus Helm chart?

Before deploying Milvus, it is important to know more about the supported configurations.

  1. (Optional) To get the values for a specific Milvus chart version, log in to SUSE Application Collection and identify the version. To prevent the password from being stored in the shell history, save it to the password.txt file.

    > skopeo login dp.apps.rancher.io \
      --username <APPCO-USERNAME> \
      --password-stdin < password.txt
    > skopeo list-tags docker://dp.apps.rancher.io/charts/milvus
  2. Log in to SUSE Application Collection where Milvus chart is stored. To prevent the password from being stored in the shell history, save it to the password.txt file.

    > helm registry login dp.apps.rancher.io \
      --username <APPCO-USERNAME> \
      --password-stdin < appco-password.txt
  3. Display all values of the Milvus Helm chart. Omit --version to display the latest chart.

    > helm show values oci://dp.apps.rancher.io/charts/milvus \
      --version <VERSION>

3.2 How do I install Milvus?

You can install Milvus either using Rancher Prime or on the command line with Helm.

3.2.1 Installing with Rancher Prime

Refer to AI application installation for a general installation procedure.

3.2.2 Installing with Helm

  1. Log in to SUSE Application Collection. To prevent the password from being stored in the shell history, save it to the password.txt file.

    > helm registry login dp.apps.rancher.io \
      --username=<APPCO-USERNAME> \
      --password-stdin < password.txt
  2. Create a namespace for Milvus.

    > kubectl create namespace milvus-system \
      --dry-run=client \
      -o yaml | kubectl apply -f -
  3. (Optional) If you have not created image pull secrets for SUSE Application Collection, create them now. To prevent the password from being stored in the shell history, save it to the password.txt file.

    > kubectl create secret docker-registry application-collection \
      --docker-server=dp.apps.rancher.io \
      --docker-username=<APPCO-USERNAME> \
      --docker-password="$(< password.txt)" \
      -n milvus-system \
      --dry-run=client -o yaml | kubectl apply -f -
  4. (Optional) To override default installation values, list them in a values.yaml file. For a complete list of Milvus chart values, refer to Section 3.1, “How do I get the values list for Milvus Helm chart?”.

  5. Install Milvus. To keep the default installation values, omit -f values.yaml.

    > helm install milvus \
      oci://dp.apps.rancher.io/charts/milvus \
      -n milvus-system \
      -f values.yaml

3.3 What custom values examples are available for Milvus?

To override the default values during the Helm chart installation or update, you can create a YAML file with custom values. Then, apply these values by specifying the path to the custom values file with the -f option of the helm command.

3.3.1 Using Apache Kafka with SUSE Storage

When Milvus is deployed in cluster mode, it uses Apache Kafka as a message queue. If Apache Kafka uses SUSE Storage as a storage back-end, you need to create an XFS storage class and make it available for the Apache Kafka deployment. Otherwise deploying Apache Kafka with a storage class of an Ext4 file system fails with the following error:

"Found directory /mnt/kafka/logs/lost+found, 'lost+found' is not
  in the form of topic-partition or topic-partition.uniqueId-delete
  (if marked for deletion)"

To introduce the XFS storage class, follow these steps:

  1. Create a file named longhorn-xfs.yaml with the following content:

    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
      name: longhorn-xfs
    provisioner: driver.longhorn.io
    allowVolumeExpansion: true
    reclaimPolicy: Delete
    volumeBindingMode: Immediate
    parameters:
      numberOfReplicas: "3"
      staleReplicaTimeout: "30"
      fromBackup: ""
      fsType: "xfs"
      dataLocality: "disabled"
      unmapMarkSnapChainRemoved: "ignored"
  2. Create the new storage class using the kubectl command.

    > kubectl apply -f longhorn-xfs.yaml
  3. Update the custom values file for Milvus to reference the Apache Kafka storage class, as in the following example:

      [...]
        kafka:
        enabled: true
        persistence:
          storageClassName: longhorn-xfs

3.4 How do I upgrade Milvus?

You can upgrade Milvus either using Rancher Prime or on the command line with Helm.

3.4.1 Upgrading with Rancher Prime

Refer to AI application upgrade for a general upgrade procedure.

3.4.2 Upgrading with Helm

  1. Log in to SUSE Application Collection. To prevent the password from being stored in the shell history, save it to the password.txt file.

    > helm registry login dp.apps.rancher.io \
      --username=<APPCO-USERNAME> \
      --password-stdin < password.txt
  2. Upgrade Milvus.

    > helm upgrade milvus \
      oci://dp.apps.rancher.io/charts/milvus \
      -n milvus-system \
      --version <VERSION_NUMBER> \ 1
      --wait --timeout 15m \
      --force-conflicts

    1

    If you omit --version, Milvus gets upgraded to the latest available version.

3.5 How do I remove Milvus?

You can remove Milvus either using Rancher Prime or on the command line with Helm.

3.5.1 Removal using Rancher Prime

Refer to AI application removal for a general removal procedure.

3.5.2 Removal using Helm

To remove Milvus using Helm, use the following command:

> helm uninstall milvus -n milvus-system