Install Milvus Standalone

This topic describes how to install Milvus standalone with Docker Compose or on Kubernetes. We recommend reading Before you Begin prior to your installation.

You can also build Milvus from source code at GitHub.

We recommend using minikube to install Milvus on Kubernetes. Minikube has a dependency on default storageclass when installed (see screenshot below). Installation in other methods requires manual configuration of the storageclass. See Change the Default Storageclass for more information.

Storageclass

1. Start a K8s cluster

$ minikube start

2. Start Milvus

Helm, the package manager for K8s, helps you to quickly start Milvus.

Add a chart repository:

$ helm repo add milvus https://milvus-io.github.io/milvus-helm/

Update charts locally:

$ helm repo update

Install the chart:

Choose a release name for the chart instance.

This tutorial uses my-release as the release name. To use a different release name, replace my-release in the following command.

Install Milvus standalone:

$ helm install my-release milvus/milvus --set cluster.enabled=false --set etcd.replicaCount=1 --set minio.mode=standalone --set pulsar.enabled=false

The default command line installs cluster version of Milvus while installing with Helm. Further setting is needed while installing Milvus standalone. For more details, see Milvus Helm chart.

See Milvus Helm Chart for more information.

After Milvus starts, the READY column displays 1/1 for all pods.

$ kubectl get pods
NAME                                               READY   STATUS      RESTARTS   AGE
my-release-etcd-0                                  1/1     Running     0          30s
my-release-milvus-standalone-54c4f88cb9-f84pf      1/1     Running     0          30s
my-release-minio-5564fbbddc-mz7f5                  1/1     Running     0          30s

3. Connect to Milvus

Open a new terminal and run the following command to forward the local port to the port that Milvus uses.

$ kubectl port-forward service/my-release-milvus 19530
Forwarding from 127.0.0.1:19530 -> 19530

4. Uninstall Milvus

$ helm uninstall my-release

5. Stop the K8s cluster

Run the following command to stop the cluster and the minikube VM without deleting created resources.

$ minikube stop
Run minikube start to restart the cluster.

6. Delete the K8s cluster

Run the following command to delete the cluster, the minikube VM, and all created resources including persistent volumes.

minikube delete
  • Save required logs from the stderr before deleting the cluster and all resources. Run kubectl logs (podname) to get the stderr of the pods.
  • See Upgrade Milvus Using Helm Chart for more information about upgrading Milvus.
Is this page helpful?
Scored Successfully!