Install Milvus Cluster

This topic describes how to install Milvus cluster 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.


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

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 cluster:

$ helm install my-release milvus/milvus
The default command line installs cluster version of Milvus while installing with Helm. No further setting is needed. For more details, see Milvus Helm charts.

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        3m23s
my-release-etcd-1                                1/1    Running   0        3m23s
my-release-etcd-2                                1/1    Running   0        3m23s
my-release-milvus-datacoord-6fd4bd885c-gkzwx     1/1    Running   0        3m23s
my-release-milvus-datanode-68cb87dcbd-4khpm      1/1    Running   0        3m23s
my-release-milvus-indexcoord-5bfcf6bdd8-nmh5l    1/1    Running   0        3m23s
my-release-milvus-indexnode-5c5f7b5bd9-l8hjg     1/1    Running   0        3m24s
my-release-milvus-proxy-6bd7f5587-ds2xv          1/1    Running   0        3m24s
my-release-milvus-querycoord-579cd79455-xht5n    1/1    Running   0        3m24s
my-release-milvus-querynode-5cd8fff495-k6gtg     1/1    Running   0        3m24s
my-release-milvus-rootcoord-7fb9488465-dmbbj     1/1    Running   0        3m23s
my-release-minio-0                               1/1    Running   0        3m23s
my-release-minio-1                               1/1    Running   0        3m23s
my-release-minio-2                               1/1    Running   0        3m23s
my-release-minio-3                               1/1    Running   0        3m23s
my-release-pulsar-autorecovery-86f5dbdf77-lchpc  1/1    Running   0        3m24s
my-release-pulsar-bookkeeper-0                   1/1    Running   0        3m23s
my-release-pulsar-bookkeeper-1                   1/1    Running   0        98s
my-release-pulsar-broker-556ff89d4c-2m29m        1/1    Running   0        3m23s
my-release-pulsar-proxy-6fbd75db75-nhg4v         1/1    Running   0        3m23s
my-release-pulsar-zookeeper-0                    1/1    Running   0        3m23s
my-release-pulsar-zookeeper-metadata-98zbr       0/1   Completed  0        3m24s

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 -> 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!